summaryrefslogtreecommitdiff
path: root/src
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 /src
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 'src')
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/api/python/CMakeLists.txt2
-rw-r--r--src/main/CMakeLists.txt25
3 files changed, 13 insertions, 17 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2679f6072..490d335a2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1134,8 +1134,7 @@ if(USE_CADICAL)
target_link_libraries(cvc4 PRIVATE CaDiCaL)
endif()
if(USE_CLN)
- target_link_libraries(cvc4 PRIVATE ${CLN_LIBRARIES})
- target_include_directories(cvc4 PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>)
+ target_link_libraries(cvc4 PRIVATE CLN)
endif()
if(USE_CRYPTOMINISAT)
target_link_libraries(cvc4 PRIVATE CryptoMiniSat)
diff --git a/src/api/python/CMakeLists.txt b/src/api/python/CMakeLists.txt
index 62482a0ba..ec156e50e 100644
--- a/src/api/python/CMakeLists.txt
+++ b/src/api/python/CMakeLists.txt
@@ -36,7 +36,7 @@ add_custom_target(
--kinds-header "${PROJECT_SOURCE_DIR}/src/api/cvc4cppkind.h"
--kinds-file-prefix "${CMAKE_CURRENT_BINARY_DIR}/cvc4kinds"
DEPENDS
- genkinds.py
+ "${CMAKE_CURRENT_BINARY_DIR}/genkinds.py"
COMMENT
"Generate cvc4kinds.{pxd,pyx}"
)
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
index 2d2b08378..fd2d415b2 100644
--- a/src/main/CMakeLists.txt
+++ b/src/main/CMakeLists.txt
@@ -41,22 +41,20 @@ add_dependencies(main cvc4 cvc4parser gen-tokens)
get_target_property(LIBCVC4_INCLUDES cvc4 INCLUDE_DIRECTORIES)
target_include_directories(main PRIVATE ${LIBCVC4_INCLUDES})
if(USE_CLN)
- target_link_libraries(main ${CLN_LIBRARIES})
- target_include_directories(main PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>)
+ target_link_libraries(main PUBLIC CLN)
endif()
-target_link_libraries(main GMP)
+target_link_libraries(main PUBLIC GMP)
# main-test library is only used for linking against api and unit tests so
# that we don't have to include all object files of main into each api/unit
# test. Do not link against main-test in any other case.
add_library(main-test driver_unified.cpp $<TARGET_OBJECTS:main>)
target_compile_definitions(main-test PRIVATE -D__BUILDING_CVC4DRIVER)
-target_link_libraries(main-test cvc4 cvc4parser)
+target_link_libraries(main-test PUBLIC cvc4 cvc4parser)
if(USE_CLN)
- target_link_libraries(main-test ${CLN_LIBRARIES})
- target_include_directories(main-test PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>)
+ target_link_libraries(main-test PUBLIC CLN)
endif()
-target_link_libraries(main-test GMP)
+target_link_libraries(main-test PUBLIC GMP)
#-----------------------------------------------------------------------------#
# cvc4 binary configuration
@@ -67,12 +65,11 @@ set_target_properties(cvc4-bin
PROPERTIES
OUTPUT_NAME cvc4
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-target_link_libraries(cvc4-bin cvc4 cvc4parser)
+target_link_libraries(cvc4-bin PUBLIC cvc4 cvc4parser)
if(USE_CLN)
- target_link_libraries(cvc4-bin ${CLN_LIBRARIES})
- target_include_directories(cvc4-bin PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>)
+ target_link_libraries(cvc4-bin PUBLIC CLN)
endif()
-target_link_libraries(cvc4-bin GMP)
+target_link_libraries(cvc4-bin PUBLIC GMP)
if(PROGRAM_PREFIX)
install(PROGRAMS
$<TARGET_FILE:cvc4-bin>
@@ -94,9 +91,9 @@ if(ENABLE_STATIC_BINARY)
endif()
if(USE_EDITLINE)
- target_link_libraries(cvc4-bin ${Editline_LIBRARIES})
- target_link_libraries(main-test ${Editline_LIBRARIES})
- target_include_directories(main PRIVATE ${Editline_INCLUDE_DIRS})
+ target_link_libraries(cvc4-bin PUBLIC ${Editline_LIBRARIES})
+ target_link_libraries(main-test PUBLIC ${Editline_LIBRARIES})
+ target_include_directories(main PUBLIC ${Editline_INCLUDE_DIRS})
endif()
#-----------------------------------------------------------------------------#
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback