summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2019-01-04 20:21:10 -0800
committerAndres Noetzli <andres.noetzli@gmail.com>2019-01-04 20:21:10 -0800
commit716626f2f41f51cda38834e5c9dc691b0c4fd664 (patch)
treedc08d11fb25c35da08129913e1cc7a678b366136 /CMakeLists.txt
parent7684686a1f75a90a3754bacc82ee50fb7b20d7c9 (diff)
cmake: Disable unit tests for static builds. (#2775)
--static now implies --no-unit-testing. Fixes #2672.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 7 insertions, 9 deletions
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()
#-----------------------------------------------------------------------------#
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback