From 4498efe1c6392572fd1b6de6dca814d630b1f834 Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Fri, 17 Aug 2018 16:58:27 -0700 Subject: [PATCH] cmake: Enable shared by default. Further, force shared builds in case of unit tests. --- CMakeLists.txt | 3 +++ cmake/ConfigCompetition.cmake | 2 +- cmake/ConfigDebug.cmake | 1 + cmake/ConfigProduction.cmake | 1 + cmake/ConfigTesting.cmake | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f39af023d..aa4f5fa79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -268,6 +268,9 @@ endif() if(ENABLE_UNIT_TESTING) find_package(CxxTest REQUIRED) enable_testing() + # Force shared libs for unit tests, static libs with unit tests are not + # working right now. + set(ENABLE_SHARED ON) endif() if(ENABLE_SHARED) diff --git a/cmake/ConfigCompetition.cmake b/cmake/ConfigCompetition.cmake index a7c7cb961..3741d027f 100644 --- a/cmake/ConfigCompetition.cmake +++ b/cmake/ConfigCompetition.cmake @@ -26,5 +26,5 @@ cvc4_set_option(ENABLE_MUZZLE ON) # enable_valgrind=no cvc4_set_option(ENABLE_VALGRIND OFF) # enable_shared=no -cvc4_set_option(ENABLE_SHARED OFF) cvc4_set_option(ENABLE_UNIT_TESTING OFF) +cvc4_set_option(ENABLE_SHARED ON) diff --git a/cmake/ConfigDebug.cmake b/cmake/ConfigDebug.cmake index 9decc07be..8ef93d111 100644 --- a/cmake/ConfigDebug.cmake +++ b/cmake/ConfigDebug.cmake @@ -24,3 +24,4 @@ cvc4_set_option(ENABLE_DUMPING ON) cvc4_set_option(ENABLE_MUZZLE OFF) # enable_valgrind=optional cvc4_set_option(ENABLE_UNIT_TESTING ON) +cvc4_set_option(ENABLE_SHARED ON) diff --git a/cmake/ConfigProduction.cmake b/cmake/ConfigProduction.cmake index 3b9a1ce98..dc3305166 100644 --- a/cmake/ConfigProduction.cmake +++ b/cmake/ConfigProduction.cmake @@ -22,3 +22,4 @@ cvc4_set_option(ENABLE_MUZZLE OFF) # enable_valgrind=no cvc4_set_option(ENABLE_VALGRIND OFF) cvc4_set_option(ENABLE_UNIT_TESTING OFF) +cvc4_set_option(ENABLE_SHARED ON) diff --git a/cmake/ConfigTesting.cmake b/cmake/ConfigTesting.cmake index 3b359af93..5b6c46ebb 100644 --- a/cmake/ConfigTesting.cmake +++ b/cmake/ConfigTesting.cmake @@ -22,3 +22,4 @@ cvc4_set_option(ENABLE_MUZZLE OFF) # enable_valgrind=no cvc4_set_option(ENABLE_VALGRIND OFF) cvc4_set_option(ENABLE_UNIT_TESTING ON) +cvc4_set_option(ENABLE_SHARED ON) -- 2.30.2