3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 01:24:08 +00:00

Only CMake >= 3.2 supports the `USES_TERMINAL` argument to

add_custom_command()
This commit is contained in:
Dan Liew 2016-02-29 16:03:20 +00:00
parent 9f5f8f128f
commit 32e51eda2e
3 changed files with 16 additions and 6 deletions

View file

@ -13,6 +13,16 @@ set(Z3_VERSION_TWEAK 0)
set(Z3_VERSION "${Z3_VERSION_MAJOR}.${Z3_VERSION_MINOR}.${Z3_VERSION_PATCH}.${Z3_VERSION_TWEAK}")
message(STATUS "Z3 version ${Z3_VERSION}")
################################################################################
# Set various useful variables depending on CMake version
################################################################################
if (("${CMAKE_VERSION}" VERSION_EQUAL "3.2") OR ("${CMAKE_VERSION}" VERSION_GREATER "3.2"))
# In CMake >= 3.2 add_custom_command() supports a ``USES_TERMINAL`` argument
set(ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG "USES_TERMINAL")
else()
set(ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG "")
endif()
################################################################################
# Message for polluted source tree sanity checks
################################################################################
@ -295,6 +305,6 @@ add_custom_target(uninstall
COMMAND
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
COMMENT "Uninstalling..."
USES_TERMINAL
${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG}
VERBATIM
)

View file

@ -76,7 +76,7 @@ macro(z3_add_component component_name)
DEPENDS "${CMAKE_SOURCE_DIR}/scripts/pyg2hpp.py" "${CMAKE_SOURCE_DIR}/scripts/mk_util.py"
COMMENT "Generating \"${_full_output_file_path}\" from \"${pyg_file}\""
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
USES_TERMINAL
${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG}
VERBATIM
)
list(APPEND _list_generated_headers "${_full_output_file_path}")
@ -175,7 +175,7 @@ macro(z3_add_install_tactic_rule)
"${CMAKE_SOURCE_DIR}/scripts/mk_util.py"
${_expanded_components}
COMMENT "Generating \"${CMAKE_CURRENT_BINARY_DIR}/install_tactic.cpp\""
USES_TERMINAL
${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG}
VERBATIM
)
endmacro()
@ -207,7 +207,7 @@ macro(z3_add_memory_initializer_rule)
"${CMAKE_SOURCE_DIR}/scripts/mk_util.py"
${_expanded_components}
COMMENT "Generating \"${CMAKE_CURRENT_BINARY_DIR}/mem_initializer.cpp\""
USES_TERMINAL
${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG}
VERBATIM
)
endmacro()
@ -239,7 +239,7 @@ macro(z3_add_gparams_register_modules_rule)
"${CMAKE_SOURCE_DIR}/scripts/mk_util.py"
${_expanded_components}
COMMENT "Generating \"${CMAKE_CURRENT_BINARY_DIR}/gparams_register_modules.cpp\""
USES_TERMINAL
${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG}
VERBATIM
)
endmacro()

View file

@ -15,7 +15,7 @@ add_custom_command(OUTPUT "database.h"
DEPENDS "${CMAKE_SOURCE_DIR}/scripts/mk_pat_db.py"
"${CMAKE_SOURCE_DIR}/scripts/mk_util.py"
COMMENT "Generating \"database.h\""
USES_TERMINAL
${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG}
VERBATIM
)