From 27fb04bc96999e101b45458c549345e864e085e9 Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Wed, 10 Mar 2021 11:40:15 -0800 Subject: [PATCH] cmake: Fix optimization level for debug builds. (#6097) Further cleans up some unused variables and moves the configuration of best to configure.sh. --- CMakeLists.txt | 13 +------------ cmake/ConfigDebug.cmake | 4 +--- configure.sh | 21 +++++++++------------ test/unit/expr/node_black.cpp | 7 +++++-- 4 files changed, 16 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f5100cd4..dc244917d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -271,16 +271,6 @@ else() endif() #-----------------------------------------------------------------------------# -# Set options for best configuration - -if(ENABLE_BEST) - cvc4_set_option(USE_ABC ON) - cvc4_set_option(USE_CADICAL ON) - cvc4_set_option(USE_CLN ON) - cvc4_set_option(USE_CRYPTOMINISAT ON) - cvc4_set_option(USE_GLPK ON) - cvc4_set_option(USE_EDITLINE ON) -endif() # Only enable unit testing if assertions are enabled. Otherwise, unit tests # that expect AssertionException to be thrown will fail. @@ -671,7 +661,6 @@ endif() message("") print_config("GPL :" ENABLE_GPL) print_config("Best configuration :" ENABLE_BEST) -print_config("Optimization level :" OPTIMIZATION_LEVEL) message("") print_config("Assertions :" ENABLE_ASSERTIONS) print_config("Debug symbols :" ENABLE_DEBUG_SYMBOLS) @@ -706,7 +695,7 @@ print_config("Kissat :" USE_KISSAT) print_config("LFSC :" USE_LFSC) print_config("LibPoly :" USE_POLY) message("") -print_config("BUILD_LIB_ONLY :" BUILD_LIB_ONLY) +print_config("Build libcvc4 only :" BUILD_LIB_ONLY) if(CVC4_USE_CLN_IMP) message("MP library : cln") diff --git a/cmake/ConfigDebug.cmake b/cmake/ConfigDebug.cmake index 723ed9236..b01c2bb23 100644 --- a/cmake/ConfigDebug.cmake +++ b/cmake/ConfigDebug.cmake @@ -9,10 +9,8 @@ ## directory for licensing information. ## add_definitions(-DCVC4_DEBUG) -set(CVC4_DEBUG 1) add_check_c_cxx_flag("-fno-inline") -set(OPTIMIZATION_LEVEL 0) -add_c_cxx_flag("-Og") +set(OPTIMIZATION_LEVEL "g") # enable_debug_symbols=yes cvc4_set_option(ENABLE_DEBUG_SYMBOLS ON) # enable_statistics=yes diff --git a/configure.sh b/configure.sh index f39cbfb00..ed84a7270 100755 --- a/configure.sh +++ b/configure.sh @@ -33,7 +33,6 @@ The following flags enable optional features (disable with --no-