Debian Codegraph @

tests/CMakeLists.txt

raw
1 # --------------------------------------------------------------------------------------
2 # Copyright (c) 2013-2026, Nucleic Development Team.
3 #
4 # Distributed under the terms of the Modified BSD License.
5 #
6 # The full license is in the file LICENSE, distributed with this software.
7 # --------------------------------------------------------------------------------------
8
9
10 enable_testing()
11
12 include(FetchContent)
13
14 FetchContent_Declare(
15 googletest
16 GIT_REPOSITORY https://github.com/google/googletest.git
17 GIT_TAG v1.16.0
18 )
19 FetchContent_MakeAvailable(googletest)
20
21 set(sources
22 SimplexTest.cpp
23 VariableTest.cpp
24 TermTest.cpp
25 ExpressionTest.cpp
26 ConstraintTest.cpp
27 StrengthTest.cpp
28 SolverTest.cpp
29 )
30
31 source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${sources})
32
33 add_executable(kiwi_tests)
34 target_compile_features(kiwi_tests PRIVATE cxx_std_23)
35 target_sources(kiwi_tests PRIVATE ${sources})
36
37 target_link_libraries(
38 kiwi_tests
39 kiwi::kiwi
40 GTest::gtest_main
41 )
42
43 include(GoogleTest)
44 gtest_discover_tests(kiwi_tests)