From: Mathias Preiner Date: Wed, 24 Nov 2021 19:29:11 +0000 (-0800) Subject: cmake: Add option --[no]-static-binary. (#7695) X-Git-Tag: cvc5-1.0.0~771 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b370211944a4520876798e4072597092a1a6236;p=cvc5.git cmake: Add option --[no]-static-binary. (#7695) Allows to disable linking against static system libraries explicitly. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f7ff3bac3..9e70f4c3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,6 +126,10 @@ option(BUILD_BINDINGS_JAVA "Build Java bindings based on new C++ API ") # Api documentation option(BUILD_DOCS "Build Api documentation") +# Link against static system libraries +cvc5_option(STATIC_BINARY "Link against static system libraries \ +(enabled by default for static builds)") + #-----------------------------------------------------------------------------# # Internal cmake variables @@ -443,6 +447,9 @@ if(BUILD_SHARED_LIBS) set(CVC5_STATIC_BUILD OFF) else() set(CVC5_STATIC_BUILD ON) + if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") + cvc5_set_option(STATIC_BINARY ON) + endif() endif() #-----------------------------------------------------------------------------# diff --git a/configure.sh b/configure.sh index 970df2e61..18808f3c6 100755 --- a/configure.sh +++ b/configure.sh @@ -31,6 +31,7 @@ General options; Features: The following flags enable optional features (disable with --no-