nix-config/templates/c++-cmake/tests/unit/CMakeLists.txt

16 lines
296 B
CMake
Raw Normal View History

2023-04-04 17:48:04 +02:00
find_package(GTest)
2024-02-16 23:44:24 +01:00
if(${GTest_FOUND})
include(GoogleTest)
2023-04-04 17:48:04 +02:00
2024-02-16 23:44:24 +01:00
add_executable(dummy_test dummy_test.cc)
target_link_libraries(dummy_test PRIVATE common_options)
2023-04-04 17:48:04 +02:00
2024-02-16 23:44:24 +01:00
target_link_libraries(dummy_test PRIVATE
GTest::gtest
GTest::gtest_main
)
2023-04-04 17:48:04 +02:00
2024-02-16 23:44:24 +01:00
gtest_discover_tests(dummy_test)
endif()