ResInsight/Fwk/AppFwk/cafVizExtensions/cafHexGridIntersectionTools/cafHexGridIntersectionTools_UnitTest/CMakeLists.txt

31 lines
968 B
CMake
Raw Normal View History

2020-10-30 06:31:16 -05:00
project(cafHexGridIntersectionTools_UnitTests)
2020-10-30 06:31:16 -05:00
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)
2020-10-30 06:31:16 -05:00
message(
STATUS
"Add flag to disable warings from gtest - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"
)
endif()
2020-10-30 06:31:16 -05:00
set(VIZ_MODULES_FOLDER_NAME ../../../../../Fwk/VizFwk)
add_subdirectory(${VIZ_MODULES_FOLDER_NAME}/LibCore LibCoreDir})
2020-10-30 06:31:16 -05:00
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
)
2020-10-30 06:31:16 -05:00
set(PROJECT_FILES
cafHexGridIntersectionToolsBasicTests.cpp
cafHexGridIntersectionTools_UnitTests_main.cpp
../cafHexGridIntersectionTools.cpp ../cafHexGridIntersectionTools.h
)
2020-10-30 06:31:16 -05:00
# add the executable
add_executable(${PROJECT_NAME} ${PROJECT_FILES} gtest/gtest-all.cpp)
2020-10-30 06:31:16 -05:00
target_link_libraries(${PROJECT_NAME} LibCore)
source_group("" FILES ${PROJECT_FILES})