Skip to content

Commit

Permalink
Fixes by cmake-format
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjenssen committed Feb 5, 2024
1 parent c5ab5b2 commit d1af778
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 27 deletions.
2 changes: 1 addition & 1 deletion ApplicationExeCode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ set(LINK_LIBRARIES
${VIZ_FWK_LIBRARIES}
ApplicationLibCode
Commands
RigGeoMechDataModel
RigGeoMechDataModel
RifGeoMechFileInterface
)

Expand Down
10 changes: 2 additions & 8 deletions ApplicationLibCode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ find_package(Eigen3 REQUIRED)
# Defining all the source (and header) files
# ##############################################################################


list(
APPEND
REFERENCED_CMAKE_FILES
Expand Down Expand Up @@ -235,12 +234,8 @@ qt5_wrap_ui(FORM_FILES_CPP ${QT_UI_FILES})
# ##############################################################################
source_group("ModelVisualization" FILES ${MODEL_VISUALIZATION_FILES})

list(
APPEND
ALL_SOURCE_FILES
${CPP_SOURCES}
${MOC_SOURCE_FILES}
${FORM_FILES_CPP}
list(APPEND ALL_SOURCE_FILES ${CPP_SOURCES} ${MOC_SOURCE_FILES}
${FORM_FILES_CPP}
)

add_library(${PROJECT_NAME} OBJECT ${ALL_SOURCE_FILES})
Expand Down Expand Up @@ -439,4 +434,3 @@ if(RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS)
enable_testing()
add_subdirectory(UnitTests)
endif()

29 changes: 11 additions & 18 deletions ApplicationLibCode/UnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# ResInsight unit tests

set(SOURCE_UNITTEST_FILES
Expand Down Expand Up @@ -112,31 +111,29 @@ if(RESINSIGHT_USE_ODB_API_OBSOLETE)
)
endif(RESINSIGHT_USE_ODB_API_OBSOLETE)


include(FetchContent)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.11.0
GIT_TAG release-1.11.0
)

FetchContent_MakeAvailable(googletest)

include(GoogleTest)

add_executable(ResInsight-tests ${SOURCE_UNITTEST_FILES} main.cpp )
add_executable(ResInsight-tests ${SOURCE_UNITTEST_FILES} main.cpp)

configure_file(
${CMAKE_CURRENT_LIST_DIR}/RiaTestDataDirectory.h.cmake
${CMAKE_BINARY_DIR}/Generated/RiaTestDataDirectory.h
)

target_include_directories(
ResInsight-tests
PUBLIC ${CMAKE_BINARY_DIR}/Generated
"$<TARGET_PROPERTY:ApplicationLibCode,PUBLIC_INCLUDE_DIRECTORIES>"
${RI_PRIVATE_INCLUDES}
${PROJECT_SOURCE_DIR}/Commands
ResInsight-tests
PUBLIC ${CMAKE_BINARY_DIR}/Generated
"$<TARGET_PROPERTY:ApplicationLibCode,PUBLIC_INCLUDE_DIRECTORIES>"
${RI_PRIVATE_INCLUDES} ${PROJECT_SOURCE_DIR}/Commands
)

target_compile_features(ResInsight-tests PRIVATE cxx_std_20)
Expand All @@ -148,12 +145,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
list(APPEND THIRD_PARTY_LIBRARIES rt atomic)
endif()

set(LINK_LIBRARIES
ApplicationLibCode
Commands
RigGeoMechDataModel
RifGeoMechFileInterface
${THIRD_PARTY_LIBRARIES}
set(LINK_LIBRARIES ApplicationLibCode Commands RigGeoMechDataModel
RifGeoMechFileInterface ${THIRD_PARTY_LIBRARIES}
)

if(RESINSIGHT_ENABLE_GRPC)
Expand All @@ -164,8 +157,8 @@ if(RESINSIGHT_USE_ODB_API)
list(APPEND LINK_LIBRARIES RifOdbReader)
endif()

target_link_libraries(ResInsight-tests PUBLIC ${LINK_LIBRARIES} GTest::gtest_main )
target_link_libraries(
ResInsight-tests PUBLIC ${LINK_LIBRARIES} GTest::gtest_main
)

gtest_discover_tests(ResInsight-tests)


0 comments on commit d1af778

Please sign in to comment.