Fix configuration printing. (#6236)
authorAina Niemetz <aina.niemetz@gmail.com>
Mon, 29 Mar 2021 18:49:53 +0000 (11:49 -0700)
committerGitHub <noreply@github.com>
Mon, 29 Mar 2021 18:49:53 +0000 (18:49 +0000)
CMakeLists.txt
cmake/Helpers.cmake

index 7148a007ce7bee87ae0f0669b25619066b3c21c3..a8c1e2e0d65f0ad793ef155f4e9b0c52304e07b5 100644 (file)
@@ -640,41 +640,40 @@ else()
   print_config("Build profile             " "${CVC4_BUILD_PROFILE_STRING}")
 endif()
 message("")
-print_config("GPL                       " ENABLE_GPL)
-print_config("Best configuration        " ENABLE_BEST)
+print_config("GPL                       " ${ENABLE_GPL})
+print_config("Best configuration        " ${ENABLE_BEST})
 message("")
-print_config("Assertions                " ENABLE_ASSERTIONS)
-print_config("Debug symbols             " ENABLE_DEBUG_SYMBOLS)
-print_config("Debug context mem mgr     " ENABLE_DEBUG_CONTEXT_MM)
+print_config("Assertions                " ${ENABLE_ASSERTIONS})
+print_config("Debug symbols             " ${ENABLE_DEBUG_SYMBOLS})
+print_config("Debug context mem mgr     " ${ENABLE_DEBUG_CONTEXT_MM})
 message("")
-print_config("Dumping                   " ENABLE_DUMPING)
-print_config("Muzzle                    " ENABLE_MUZZLE)
-print_config("Proofs                    " ENABLE_PROOFS)
-print_config("Statistics                " ENABLE_STATISTICS)
-print_config("Tracing                   " ENABLE_TRACING)
+print_config("Dumping                   " ${ENABLE_DUMPING})
+print_config("Muzzle                    " ${ENABLE_MUZZLE})
+print_config("Statistics                " ${ENABLE_STATISTICS})
+print_config("Tracing                   " ${ENABLE_TRACING})
 message("")
-print_config("ASan                      " ENABLE_ASAN)
-print_config("UBSan                     " ENABLE_UBSAN)
-print_config("TSan                      " ENABLE_TSAN)
-print_config("Coverage (gcov)           " ENABLE_COVERAGE)
-print_config("Profiling (gprof)         " ENABLE_PROFILING)
-print_config("Unit tests                " ENABLE_UNIT_TESTING)
-print_config("Valgrind                  " ENABLE_VALGRIND)
+print_config("ASan                      " ${ENABLE_ASAN})
+print_config("UBSan                     " ${ENABLE_UBSAN})
+print_config("TSan                      " ${ENABLE_TSAN})
+print_config("Coverage (gcov)           " ${ENABLE_COVERAGE})
+print_config("Profiling (gprof)         " ${ENABLE_PROFILING})
+print_config("Unit tests                " ${ENABLE_UNIT_TESTING})
+print_config("Valgrind                  " ${ENABLE_VALGRIND})
 message("")
-print_config("Shared libs               " ENABLE_SHARED)
-print_config("Static binary             " ENABLE_STATIC_BINARY)
-print_config("Python bindings           " BUILD_BINDINGS_PYTHON)
-print_config("Java bindings             " BUILD_BINDINGS_JAVA)
-print_config("Python2                   " USE_PYTHON2)
+print_config("Shared libs               " ${ENABLE_SHARED})
+print_config("Static binary             " ${ENABLE_STATIC_BINARY})
+print_config("Python bindings           " ${BUILD_BINDINGS_PYTHON})
+print_config("Java bindings             " ${BUILD_BINDINGS_JAVA})
+print_config("Python2                   " ${USE_PYTHON2})
 message("")
-print_config("ABC                       " USE_ABC)
-print_config("CaDiCaL                   " USE_CADICAL)
-print_config("CryptoMiniSat             " USE_CRYPTOMINISAT)
-print_config("GLPK                      " USE_GLPK)
-print_config("Kissat                    " USE_KISSAT)
-print_config("LibPoly                   " USE_POLY)
+print_config("ABC                       " ${USE_ABC})
+print_config("CaDiCaL                   " ${USE_CADICAL})
+print_config("CryptoMiniSat             " ${USE_CRYPTOMINISAT})
+print_config("GLPK                      " ${USE_GLPK})
+print_config("Kissat                    " ${USE_KISSAT})
+print_config("LibPoly                   " ${USE_POLY})
 message("")
-print_config("Build libcvc4 only        " BUILD_LIB_ONLY)
+print_config("Build libcvc4 only        " ${BUILD_LIB_ONLY})
 
 if(CVC4_USE_CLN_IMP)
   print_config("MP library                " "cln")
@@ -708,6 +707,7 @@ endif()
 if(SYMFPU_DIR)
   print_config("SYMFPU dir                " ${SYMFPU_DIR})
 endif()
+print_config("asdf" "")
 message("")
 print_config("CPPLAGS (-D...)" "${CVC4_DEFINITIONS}")
 print_config("CXXFLAGS       " "${CMAKE_CXX_FLAGS}")
index d237d6016f5974efc813fe1c5248ed8a52a18a3c..8b448d57dab1490a1f3b069241b95dcd06d9b96d 100644 (file)
@@ -130,16 +130,16 @@ endmacro()
 
 # Helper to print the configuration of a 2-valued or 3-valued option 'var'
 # with prefix 'str'.
-macro(print_config str var)
+function(print_config str var)
   if("${var}" STREQUAL "ON")
     set(OPT_VAL_STR "on")
-  elseif("${var}" STREQUAL "OFF")
+  elseif("${var}" STREQUAL "OFF" OR "${var}" STREQUAL "IGNORE")
     set(OPT_VAL_STR "off")
   else()
-    set(OPT_VAL_STR ${var})
+    set(OPT_VAL_STR "${var}")
   endif()
   message("${Blue}${str}: ${Green}${OPT_VAL_STR}${ResetColor}")
-endmacro()
+endfunction()
 
 
 # Collect all source files that are required to build libcvc4 in LIBCVC4_SRCS