1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
include(GoogleTest) # provides gtest_discover_tests
set(test UnitTestNumeric)
if(MSVC)
string(APPEND CMAKE_CXX_FLAGS " -DGTEST_LINKED_AS_SHARED_LIBRARY=1")
endif()
file(GLOB source_files "*.cpp" ${CMAKE_SOURCE_DIR}/Tests/GTestWrapper/TestAll.cpp)
add_executable(${test} ${source_files})
target_compile_definitions(${test} PRIVATE -DBORNAGAIN_PYTHON)
target_include_directories(${test} PUBLIC
${CMAKE_SOURCE_DIR}/Tests/Unit/utilities)
target_link_libraries(${test} BornAgainSim gtest)
if(GCC)
target_compile_options(${test} PUBLIC "-Wno-deprecated-copy")
endif()
gtest_discover_tests(${test} DISCOVERY_TIMEOUT 300 TEST_PREFIX "Numeric." PROPERTIES LABELS "XL")
|