summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGereon Kremer <gereon.kremer@cs.rwth-aachen.de>2021-03-31 23:17:38 +0200
committerGitHub <noreply@github.com>2021-03-31 21:17:38 +0000
commitf9a9af855fb65804ff0b36e764ccd9d0fa9f87f8 (patch)
tree2c90b0e704366541187198231102b2d1eed26f41 /src
parent39ea1d8a1497a83d1efc649bd10da82916e5db5f (diff)
Refactor GMP and Poly dependencies (#6245)
Refactors GMP and libpoly to also use external projects and be available within cmake as proper targets.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/main/CMakeLists.txt11
-rw-r--r--src/parser/CMakeLists.txt3
3 files changed, 10 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 78236f989..2679f6072 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1148,8 +1148,7 @@ if(USE_GLPK)
target_include_directories(cvc4 PRIVATE ${GLPK_INCLUDE_DIR})
endif()
if(USE_POLY)
- target_link_libraries(cvc4 PRIVATE ${POLY_LIBRARIES})
- target_include_directories(cvc4 PRIVATE ${POLY_INCLUDE_DIR})
+ target_link_libraries(cvc4 PRIVATE Polyxx)
endif()
if(USE_SYMFPU)
target_link_libraries(cvc4 PRIVATE SymFPU)
@@ -1157,8 +1156,7 @@ endif()
# Note: When linked statically GMP needs to be linked after CLN since CLN
# depends on GMP.
-target_link_libraries(cvc4 PRIVATE ${GMP_LIBRARIES})
-target_include_directories(cvc4 PRIVATE $<BUILD_INTERFACE:${GMP_INCLUDE_DIR}>)
+target_link_libraries(cvc4 PRIVATE GMP)
# Add rt library
# Note: For glibc < 2.17 we have to additionally link against rt (man clock_gettime).
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
index 2e9757fc7..2d2b08378 100644
--- a/src/main/CMakeLists.txt
+++ b/src/main/CMakeLists.txt
@@ -40,6 +40,11 @@ endif()
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}>)
+endif()
+target_link_libraries(main 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
@@ -51,8 +56,7 @@ if(USE_CLN)
target_link_libraries(main-test ${CLN_LIBRARIES})
target_include_directories(main-test PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>)
endif()
-target_link_libraries(main-test ${GMP_LIBRARIES})
-target_include_directories(main-test PRIVATE $<BUILD_INTERFACE:${GMP_INCLUDE_DIR}>)
+target_link_libraries(main-test GMP)
#-----------------------------------------------------------------------------#
# cvc4 binary configuration
@@ -68,8 +72,7 @@ if(USE_CLN)
target_link_libraries(cvc4-bin ${CLN_LIBRARIES})
target_include_directories(cvc4-bin PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>)
endif()
-target_link_libraries(cvc4-bin ${GMP_LIBRARIES})
-target_include_directories(cvc4-bin PRIVATE $<BUILD_INTERFACE:${GMP_INCLUDE_DIR}>)
+target_link_libraries(cvc4-bin GMP)
if(PROGRAM_PREFIX)
install(PROGRAMS
$<TARGET_FILE:cvc4-bin>
diff --git a/src/parser/CMakeLists.txt b/src/parser/CMakeLists.txt
index 236517b0c..d131fa7b3 100644
--- a/src/parser/CMakeLists.txt
+++ b/src/parser/CMakeLists.txt
@@ -108,8 +108,7 @@ if(USE_CLN)
target_link_libraries(cvc4parser PRIVATE ${CLN_LIBRARIES})
target_include_directories(cvc4parser PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>)
endif()
-target_link_libraries(cvc4parser PRIVATE ${GMP_LIBRARIES})
-target_include_directories(cvc4parser PRIVATE $<BUILD_INTERFACE:${GMP_INCLUDE_DIR}>)
+target_link_libraries(cvc4parser PRIVATE GMP)
install(TARGETS cvc4parser
EXPORT cvc4-targets
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback