ResInsight/Fwk/AppFwk/cafVizExtensions/cafHexGridIntersectionTools/cafHexGridIntersectionTools_UnitTest/CMakeLists.txt
Eirik Marthinsen 9701866736 CMake: Update/Remove old minimum version check
- Update the minimum required CMake version to 3.15 for Fwk folders
  that might be used as top level projects.
- Remove the minimum required CMake version from projects that is just
  included from other top level projects.

Since version 3.19 CMake has been warning that CMake versions below 3.5
is deprecated and support will be removed in the future. This will
silence those warning.

By removing the minimum required version check from projects that is not
intended as top level projects we avoid redundant checks and simplifies
future maintenance.

Closes #10957
2023-12-16 17:35:54 +01:00

31 lines
968 B
CMake

project(cafHexGridIntersectionTools_UnitTests)
if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
# VS 2017 : Disable warnings from from gtest code, using deprecated code
# related to TR1
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
message(
STATUS
"Add flag to disable warings from gtest - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"
)
endif()
set(VIZ_MODULES_FOLDER_NAME ../../../../../Fwk/VizFwk)
add_subdirectory(${VIZ_MODULES_FOLDER_NAME}/LibCore LibCoreDir})
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
)
set(PROJECT_FILES
cafHexGridIntersectionToolsBasicTests.cpp
cafHexGridIntersectionTools_UnitTests_main.cpp
../cafHexGridIntersectionTools.cpp ../cafHexGridIntersectionTools.h
)
# add the executable
add_executable(${PROJECT_NAME} ${PROJECT_FILES} gtest/gtest-all.cpp)
target_link_libraries(${PROJECT_NAME} LibCore)
source_group("" FILES ${PROJECT_FILES})