summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGereon Kremer <gereon.kremer@cs.rwth-aachen.de>2021-04-01 20:20:53 +0200
committerGitHub <noreply@github.com>2021-04-01 18:20:53 +0000
commit3f4b33522bd04b509b73267550d24c44e61998ce (patch)
tree8065d0d2c20ec8d4005880d0565589efd3dc210b /test
parent05a53a2ac405bcd18a84024247145f161809c3b0 (diff)
Refactor CLN dependency & Cleanup (#6251)
This PR migrates CLN to a new Find script and adds the possibility to install CLN if not found in the system. Also, it does a bit of cleanup.
Diffstat (limited to 'test')
-rw-r--r--test/api/CMakeLists.txt7
-rw-r--r--test/unit/CMakeLists.txt13
2 files changed, 9 insertions, 11 deletions
diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt
index 1deea4a87..18c366a45 100644
--- a/test/api/CMakeLists.txt
+++ b/test/api/CMakeLists.txt
@@ -30,13 +30,12 @@ set(CVC4_API_TEST_FLAGS
macro(cvc4_add_api_test name)
set(test_bin_dir ${CMAKE_BINARY_DIR}/bin/test/api/)
add_executable(${name} ${name}.cpp)
- target_link_libraries(${name} main-test)
+ target_link_libraries(${name} PUBLIC main-test)
target_compile_definitions(${name} PRIVATE ${CVC4_API_TEST_FLAGS})
if(USE_CLN)
- target_link_libraries(${name} ${CLN_LIBRARIES})
- target_include_directories(${name} PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>)
+ target_link_libraries(${name} PRIVATE CLN)
endif()
- target_link_libraries(${name} GMP)
+ target_link_libraries(${name} PRIVATE GMP)
set_target_properties(${name}
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${test_bin_dir})
add_test(api/${name} ${test_bin_dir}/${name})
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
index 7b82f3346..0be0b80e1 100644
--- a/test/unit/CMakeLists.txt
+++ b/test/unit/CMakeLists.txt
@@ -37,18 +37,17 @@ macro(cvc4_add_unit_test is_white name output_dir)
add_executable(${name} ${test_src})
target_compile_definitions(${name} PRIVATE ${CVC4_UNIT_TEST_FLAGS_BLACK})
gtest_add_tests(TARGET ${name})
- target_link_libraries(${name} main-test)
- target_link_libraries(${name} GTest::Main)
- target_link_libraries(${name} GTest::GTest)
+ target_link_libraries(${name} PUBLIC main-test)
+ target_link_libraries(${name} PUBLIC GTest::Main)
+ target_link_libraries(${name} PUBLIC GTest::GTest)
if(USE_CLN)
- target_link_libraries(${name} ${CLN_LIBRARIES})
- target_include_directories(${name} PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>)
+ target_link_libraries(${name} PUBLIC CLN)
endif()
if(USE_POLY)
- target_link_libraries(${name} Polyxx)
+ target_link_libraries(${name} PUBLIC Polyxx)
endif()
- target_link_libraries(${name} GMP)
+ target_link_libraries(${name} PUBLIC GMP)
if(${is_white})
target_compile_options(${name} PRIVATE -fno-access-control)
endif()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback