mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
Move where the Z3 API header files to be scanned by the Python scripts
is declared out of ``src/api/CMakeLists.txt`` and into ``src/CMakeLists.txt``. We will need this list to generate the ``api_dll.def`` module definition file for MSVC. Whilst I'm here also fix a stray use of ``USES_TERMINAL`` in ``add_custom_command()``.
This commit is contained in:
parent
46ac368f86
commit
beb21126e2
|
@ -1,9 +1,38 @@
|
||||||
|
################################################################################
|
||||||
|
# API header files
|
||||||
|
################################################################################
|
||||||
|
# This lists the API header files that are scanned by
|
||||||
|
# some of the build rules to generate some files needed
|
||||||
|
# by the build
|
||||||
|
set(Z3_API_HEADER_FILES_TO_SCAN
|
||||||
|
z3_api.h
|
||||||
|
z3_ast_containers.h
|
||||||
|
z3_algebraic.h
|
||||||
|
z3_polynomial.h
|
||||||
|
z3_rcf.h
|
||||||
|
z3_fixedpoint.h
|
||||||
|
z3_optimization.h
|
||||||
|
z3_interp.h
|
||||||
|
z3_fpa.h
|
||||||
|
)
|
||||||
|
set(Z3_FULL_PATH_API_HEADER_FILES_TO_SCAN "")
|
||||||
|
foreach (header_file ${Z3_API_HEADER_FILES_TO_SCAN})
|
||||||
|
set(full_path_api_header_file "${CMAKE_CURRENT_SOURCE_DIR}/api/${header_file}")
|
||||||
|
list(APPEND Z3_FULL_PATH_API_HEADER_FILES_TO_SCAN "${full_path_api_header_file}")
|
||||||
|
if (NOT EXISTS "${full_path_api_header_file}")
|
||||||
|
message(FATAL_ERROR "API header file \"${full_path_api_header_file}\" does not exist")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Traverse directories each adding a Z3 component
|
||||||
|
################################################################################
|
||||||
# I'm duplicating the order in ``mk_project.py`` for now to help us keep
|
# I'm duplicating the order in ``mk_project.py`` for now to help us keep
|
||||||
# the build systems in sync.
|
# the build systems in sync.
|
||||||
#
|
#
|
||||||
# The components in these directory explicitly declare their dependencies so
|
# The components in these directory explicitly declare their dependencies so
|
||||||
# you may be able to re-order some of these directories but an error will be
|
# you may be able to re-order some of these directories but an error will be
|
||||||
# raised if you try to declare a component is depedent on another component
|
# raised if you try to declare a component is dependent on another component
|
||||||
# that has not yet been declared.
|
# that has not yet been declared.
|
||||||
add_subdirectory(util)
|
add_subdirectory(util)
|
||||||
add_subdirectory(math/polynomial)
|
add_subdirectory(math/polynomial)
|
||||||
|
@ -138,6 +167,7 @@ install(TARGETS libz3
|
||||||
ARCHIVE DESTINATION "${Z3_INSTALL_LIB_DIR}"
|
ARCHIVE DESTINATION "${Z3_INSTALL_LIB_DIR}"
|
||||||
PUBLIC_HEADER DESTINATION "${Z3_INSTALL_INCLUDE_DIR}"
|
PUBLIC_HEADER DESTINATION "${Z3_INSTALL_INCLUDE_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Z3 executable
|
# Z3 executable
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
|
@ -1,14 +1,3 @@
|
||||||
set(api_header_files_to_scan
|
|
||||||
z3_api.h
|
|
||||||
z3_ast_containers.h
|
|
||||||
z3_algebraic.h
|
|
||||||
z3_polynomial.h
|
|
||||||
z3_rcf.h
|
|
||||||
z3_fixedpoint.h
|
|
||||||
z3_optimization.h
|
|
||||||
z3_interp.h
|
|
||||||
z3_fpa.h
|
|
||||||
)
|
|
||||||
set(generated_files
|
set(generated_files
|
||||||
api_commands.cpp
|
api_commands.cpp
|
||||||
api_log_macros.cpp
|
api_log_macros.cpp
|
||||||
|
@ -23,10 +12,6 @@ foreach (gen_file ${generated_files})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set(full_path_api_header_files_to_scan "")
|
|
||||||
foreach (header_file ${api_header_files_to_scan})
|
|
||||||
list(APPEND full_path_api_header_files_to_scan "${CMAKE_CURRENT_SOURCE_DIR}/${header_file}")
|
|
||||||
endforeach()
|
|
||||||
set(full_path_generated_files "")
|
set(full_path_generated_files "")
|
||||||
foreach (gen_file ${generated_files})
|
foreach (gen_file ${generated_files})
|
||||||
list(APPEND full_path_generated_files "${CMAKE_CURRENT_BINARY_DIR}/${gen_file}")
|
list(APPEND full_path_generated_files "${CMAKE_CURRENT_BINARY_DIR}/${gen_file}")
|
||||||
|
@ -36,12 +21,12 @@ add_custom_command(OUTPUT ${generated_files}
|
||||||
COMMAND "${PYTHON_EXECUTABLE}"
|
COMMAND "${PYTHON_EXECUTABLE}"
|
||||||
"${CMAKE_SOURCE_DIR}/scripts/update_api.py"
|
"${CMAKE_SOURCE_DIR}/scripts/update_api.py"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
${full_path_api_header_files_to_scan}
|
${Z3_FULL_PATH_API_HEADER_FILES_TO_SCAN}
|
||||||
DEPENDS "${CMAKE_SOURCE_DIR}/scripts/update_api.py"
|
DEPENDS "${CMAKE_SOURCE_DIR}/scripts/update_api.py"
|
||||||
"${CMAKE_SOURCE_DIR}/scripts/mk_util.py"
|
"${CMAKE_SOURCE_DIR}/scripts/mk_util.py"
|
||||||
${full_path_api_header_files_to_scan}
|
${Z3_FULL_PATH_API_HEADER_FILES_TO_SCAN}
|
||||||
COMMENT "Generating ${generated_files}"
|
COMMENT "Generating ${generated_files}"
|
||||||
USES_TERMINAL
|
${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG}
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue