diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2021-07-23 13:57:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-23 20:57:42 +0000 |
commit | 1dfc52234354e8a88aeb2e0d05d83930fc434893 (patch) | |
tree | 4c0f1047ef36222691e7a7afb0e9bc6e33b68062 /cmake/Helpers.cmake | |
parent | df4c8cbe704fce51623bc9540def9b8806af4fd9 (diff) |
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.
Diffstat (limited to 'cmake/Helpers.cmake')
-rw-r--r-- | cmake/Helpers.cmake | 21 |
1 files changed, 18 insertions, 3 deletions
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() |