summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorGereon Kremer <nafur42@gmail.com>2021-10-07 03:59:50 -0700
committerGitHub <noreply@github.com>2021-10-07 10:59:50 +0000
commit8773b8921d705d458b90566cb41e97ee596aeeb1 (patch)
treefed670f246a4d3619ba73065de7fb76a815cb65b /src/main
parent65431e88f8e0c48c90bc540b95c63b67d8387219 (diff)
Fix/Improve static and shared builds with CLN or Poly (#7306)
We already created two dependency targets `GMP_SHARED` and `GMP_STATIC`, as we could not use `libgmp.a` for shared linking (as it is built without `-fPIC`). This PR fixes our handling of CLN and Poly: they would always link with `GMP_STATIC`, leading to having both `GMP_SHARED` and `GMP_STATIC` in the linker command line in certain situations. We now also have `*_SHARED` and `*_STATIC` for both CLN and Poly.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
index 1aedcb265..8cd96b3f1 100644
--- a/src/main/CMakeLists.txt
+++ b/src/main/CMakeLists.txt
@@ -52,6 +52,12 @@ add_dependencies(main gen-tokens)
add_library(main-test driver_unified.cpp $<TARGET_OBJECTS:main>)
target_compile_definitions(main-test PRIVATE -D__BUILDING_CVC5DRIVER)
target_link_libraries(main-test PUBLIC cvc5-shared cvc5parser-shared)
+if(USE_CLN)
+ target_link_libraries(main-test PUBLIC CLN_SHARED)
+endif()
+if(USE_POLY)
+ target_link_libraries(main-test PUBLIC Polyxx_SHARED)
+endif()
#-----------------------------------------------------------------------------#
# cvc5 binary configuration
@@ -83,6 +89,7 @@ if(ENABLE_STATIC_BINARY)
set_target_properties(cvc5-bin PROPERTIES LINK_SEARCH_START_STATIC ON)
set_target_properties(cvc5-bin PROPERTIES LINK_SEARCH_END_STATIC ON)
endif()
+ set_target_properties(cvc5-bin PROPERTIES INSTALL_RPATH "")
endif()
if(USE_EDITLINE)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback