From: Andres Noetzli Date: Fri, 23 Jul 2021 20:57:42 +0000 (-0700) Subject: Configuration: Indicate dependencies being built (#6921) X-Git-Tag: cvc5-1.0.0~1459 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1dfc52234354e8a88aeb2e0d05d83930fc434893;p=cvc5.git Configuration: Indicate dependencies being built (#6921) This commit changes the output of our configuration to show which dependencies are being built as part of the cvc5 build. For example: ``` ABC : off CryptoMiniSat : off GLPK : off Kissat : off LibPoly : on (local) CoCoALib : off Build libcvc5 only : off MP library : gmp (system) Editline : off ``` Indicates that `LibPoly` was not found in the system and is thus built as part of the cvc5 build and GMP was found in the system. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f5f571046..bb8e305b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -657,18 +657,18 @@ print_config("Java bindings " ${BUILD_BINDINGS_JAVA}) print_config("Python2 " ${USE_PYTHON2}) message("") print_config("ABC " ${USE_ABC}) -print_config("CryptoMiniSat " ${USE_CRYPTOMINISAT}) +print_config("CryptoMiniSat " ${USE_CRYPTOMINISAT} FOUND_SYSTEM ${CryptoMiniSat_FOUND_SYSTEM}) print_config("GLPK " ${USE_GLPK}) -print_config("Kissat " ${USE_KISSAT}) -print_config("LibPoly " ${USE_POLY}) -print_config("CoCoALib " ${USE_COCOA}) +print_config("Kissat " ${USE_KISSAT} FOUND_SYSTEM ${Kissat_FOUND_SYSTEM}) +print_config("LibPoly " ${USE_POLY} FOUND_SYSTEM ${Poly_FOUND_SYSTEM}) +print_config("CoCoALib " ${USE_COCOA} FOUND_SYSTEM ${CoCoA_FOUND_SYSTEM}) message("") print_config("Build libcvc5 only " ${BUILD_LIB_ONLY}) if(CVC5_USE_CLN_IMP) - print_config("MP library " "cln") + print_config("MP library " "cln" FOUND_SYSTEM ${CLN_FOUND_SYSTEM}) else() - print_config("MP library " "gmp") + print_config("MP library " "gmp" FOUND_SYSTEM ${GMP_FOUND_SYSTEM}) endif() print_config("Editline " ${USE_EDITLINE}) message("") diff --git a/cmake/Helpers.cmake b/cmake/Helpers.cmake index 10bcf96de..283828e29 100644 --- a/cmake/Helpers.cmake +++ b/cmake/Helpers.cmake @@ -131,9 +131,15 @@ macro(print_info msg) message("${Blue}${msg}${ResetColor}") endmacro() -# Helper to print the configuration of a 2-valued or 3-valued option 'var' -# with prefix 'str'. +# Helper to print the configuration of a 2-valued or 3-valued option 'var' with +# prefix 'str'. Optionally takes a `FOUND_SYSTEM` argument that is used to +# indicate when a given dependency is built as part of the cvc5 build. function(print_config str var) + set(options) + set(oneValueArgs FOUND_SYSTEM) + set(multiValueArgs) + cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + if("${var}" STREQUAL "ON") set(OPT_VAL_STR "on") elseif("${var}" STREQUAL "OFF" OR "${var}" STREQUAL "IGNORE") @@ -141,7 +147,16 @@ function(print_config str var) else() set(OPT_VAL_STR "${var}") endif() - message("${Blue}${str}: ${Green}${OPT_VAL_STR}${ResetColor}") + + if("${ARGS_FOUND_SYSTEM}" STREQUAL "TRUE") + set(OPT_FOUND_SYSTEM_STR " (system)") + elseif("${ARGS_FOUND_SYSTEM}" STREQUAL "FALSE") + set(OPT_FOUND_SYSTEM_STR " (local)") + else() + set(OPT_FOUND_SYSTEM_STR "") + endif() + + message("${Blue}${str}: ${Green}${OPT_VAL_STR}${OPT_FOUND_SYSTEM_STR}${ResetColor}") endfunction()