From: Mathias Preiner Date: Sat, 5 Jan 2019 04:21:10 +0000 (-0800) Subject: cmake: Disable unit tests for static builds. (#2775) X-Git-Tag: cvc5-1.0.0~4301 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=716626f2f41f51cda38834e5c9dc691b0c4fd664;p=cvc5.git cmake: Disable unit tests for static builds. (#2775) --static now implies --no-unit-testing. Fixes #2672. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 3265830cc..33e06840e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,15 +212,6 @@ if(NOT ENABLE_ASSERTIONS) set(ENABLE_UNIT_TESTING OFF) endif() -# Never build unit tests as static binaries, otherwise we'll end up with -# ~300MB per unit test. -if(ENABLE_UNIT_TESTING) - if(NOT ENABLE_SHARED) - message(WARNING "Disabling static build since unit testing is enabled.") - endif() - set(ENABLE_SHARED ON) -endif() - #-----------------------------------------------------------------------------# # Shared/static libraries # @@ -239,6 +230,13 @@ else() # This is required to force find_package(Boost) to use static libraries. set(Boost_USE_STATIC_LIBS ON) cvc4_set_option(ENABLE_STATIC_BINARY ON) + + # Never build unit tests as static binaries, otherwise we'll end up with + # ~300MB per unit test. + if(ENABLE_UNIT_TESTING) + message(WARNING "Disabling unit tests since static build is enabled.") + set(ENABLE_UNIT_TESTING OFF) + endif() endif() #-----------------------------------------------------------------------------#