mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 01:24:08 +00:00
rename additional build options #2709
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
3ab9a1c88c
commit
e9d9792524
|
@ -57,16 +57,16 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
|
||||||
################################################################################
|
################################################################################
|
||||||
include(${PROJECT_SOURCE_DIR}/cmake/git_utils.cmake)
|
include(${PROJECT_SOURCE_DIR}/cmake/git_utils.cmake)
|
||||||
macro(disable_git_describe)
|
macro(disable_git_describe)
|
||||||
message(WARNING "Disabling INCLUDE_GIT_DESCRIBE")
|
message(WARNING "Disabling Z3_INCLUDE_GIT_DESCRIBE")
|
||||||
set(INCLUDE_GIT_DESCRIBE OFF CACHE BOOL "Include git describe output in version output" FORCE)
|
set(Z3_INCLUDE_GIT_DESCRIBE OFF CACHE BOOL "Include git describe output in version output" FORCE)
|
||||||
endmacro()
|
endmacro()
|
||||||
macro(disable_git_hash)
|
macro(disable_git_hash)
|
||||||
message(WARNING "Disabling INCLUDE_GIT_HASH")
|
message(WARNING "Disabling Z3_INCLUDE_GIT_HASH")
|
||||||
set(INCLUDE_GIT_HASH OFF CACHE BOOL "Include git hash in version output" FORCE)
|
set(Z3_INCLUDE_GIT_HASH OFF CACHE BOOL "Include git hash in version output" FORCE)
|
||||||
unset(Z3GITHASH) # Used in configure_file()
|
unset(Z3GITHASH) # Used in configure_file()
|
||||||
endmacro()
|
endmacro()
|
||||||
option(INCLUDE_GIT_HASH "Include git hash in version output" ON)
|
option(Z3_INCLUDE_GIT_HASH "Include git hash in version output" ON)
|
||||||
option(INCLUDE_GIT_DESCRIBE "Include git describe output in version output" ON)
|
option(Z3_INCLUDE_GIT_DESCRIBE "Include git describe output in version output" ON)
|
||||||
|
|
||||||
set(GIT_DIR "${PROJECT_SOURCE_DIR}/.git")
|
set(GIT_DIR "${PROJECT_SOURCE_DIR}/.git")
|
||||||
if (EXISTS "${GIT_DIR}")
|
if (EXISTS "${GIT_DIR}")
|
||||||
|
@ -74,7 +74,7 @@ if (EXISTS "${GIT_DIR}")
|
||||||
# a re-configure is triggered when the HEAD changes.
|
# a re-configure is triggered when the HEAD changes.
|
||||||
add_git_dir_dependency("${PROJECT_SOURCE_DIR}" ADD_GIT_DEP_SUCCESS)
|
add_git_dir_dependency("${PROJECT_SOURCE_DIR}" ADD_GIT_DEP_SUCCESS)
|
||||||
if (ADD_GIT_DEP_SUCCESS)
|
if (ADD_GIT_DEP_SUCCESS)
|
||||||
if (INCLUDE_GIT_HASH)
|
if (Z3_INCLUDE_GIT_HASH)
|
||||||
get_git_head_hash("${GIT_DIR}" Z3GITHASH)
|
get_git_head_hash("${GIT_DIR}" Z3GITHASH)
|
||||||
if (NOT Z3GITHASH)
|
if (NOT Z3GITHASH)
|
||||||
message(WARNING "Failed to get Git hash")
|
message(WARNING "Failed to get Git hash")
|
||||||
|
@ -87,7 +87,7 @@ if (EXISTS "${GIT_DIR}")
|
||||||
message(STATUS "Not using Git hash in version output")
|
message(STATUS "Not using Git hash in version output")
|
||||||
unset(Z3GITHASH) # Used in configure_file()
|
unset(Z3GITHASH) # Used in configure_file()
|
||||||
endif()
|
endif()
|
||||||
if (INCLUDE_GIT_DESCRIBE)
|
if (Z3_INCLUDE_GIT_DESCRIBE)
|
||||||
get_git_head_describe("${GIT_DIR}" Z3_GIT_DESCRIPTION)
|
get_git_head_describe("${GIT_DIR}" Z3_GIT_DESCRIPTION)
|
||||||
if (NOT Z3_GIT_DESCRIPTION)
|
if (NOT Z3_GIT_DESCRIPTION)
|
||||||
message(WARNING "Failed to get Git description")
|
message(WARNING "Failed to get Git description")
|
||||||
|
@ -267,7 +267,7 @@ if (Z3_API_LOG_SYNC)
|
||||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-DZ3_LOG_SYNC")
|
list(APPEND Z3_COMPONENT_CXX_DEFINES "-DZ3_LOG_SYNC")
|
||||||
message(STATUS "Using Z3_API_LOG_SYNC")
|
message(STATUS "Using Z3_API_LOG_SYNC")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Not using API_LOG_SYNC")
|
message(STATUS "Not using Z3_API_LOG_SYNC")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -361,8 +361,8 @@ endif()
|
||||||
################################################################################
|
################################################################################
|
||||||
# Tracing
|
# Tracing
|
||||||
################################################################################
|
################################################################################
|
||||||
option(ENABLE_TRACING_FOR_NON_DEBUG "Enable tracing in non-debug builds." OFF)
|
option(Z3_ENABLE_TRACING_FOR_NON_DEBUG "Enable tracing in non-debug builds." OFF)
|
||||||
if (ENABLE_TRACING_FOR_NON_DEBUG)
|
if (Z3_ENABLE_TRACING_FOR_NON_DEBUG)
|
||||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_TRACE")
|
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_TRACE")
|
||||||
else()
|
else()
|
||||||
# Tracing is always enabled in debug builds
|
# Tracing is always enabled in debug builds
|
||||||
|
@ -613,16 +613,16 @@ install(
|
||||||
################################################################################
|
################################################################################
|
||||||
# Examples
|
# Examples
|
||||||
################################################################################
|
################################################################################
|
||||||
option(ENABLE_EXAMPLE_TARGETS "Build Z3 api examples" ON)
|
option(Z3_ENABLE_EXAMPLE_TARGETS "Build Z3 api examples" ON)
|
||||||
if (ENABLE_EXAMPLE_TARGETS)
|
if (Z3_ENABLE_EXAMPLE_TARGETS)
|
||||||
add_subdirectory(examples)
|
add_subdirectory(examples)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Documentation
|
# Documentation
|
||||||
################################################################################
|
################################################################################
|
||||||
option(BUILD_DOCUMENTATION "Build API documentation" OFF)
|
option(Z3_BUILD_DOCUMENTATION "Build API documentation" OFF)
|
||||||
if (BUILD_DOCUMENTATION)
|
if (Z3_BUILD_DOCUMENTATION)
|
||||||
message(STATUS "Building documentation enabled")
|
message(STATUS "Building documentation enabled")
|
||||||
add_subdirectory(doc)
|
add_subdirectory(doc)
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -241,9 +241,9 @@ The following useful options can be passed to CMake whilst configuring.
|
||||||
* ``CMAKE_INSTALL_PYTHON_PKG_DIR`` - STRING. The path to install the z3 python bindings. This can be relative (to ``CMAKE_INSTALL_PREFIX``) or absolute.
|
* ``CMAKE_INSTALL_PYTHON_PKG_DIR`` - STRING. The path to install the z3 python bindings. This can be relative (to ``CMAKE_INSTALL_PREFIX``) or absolute.
|
||||||
* ``CMAKE_INSTALL_Z3_CMAKE_PACKAGE_DIR`` - STRING. The path to install CMake package files (e.g. ``/usr/lib/cmake/z3``).
|
* ``CMAKE_INSTALL_Z3_CMAKE_PACKAGE_DIR`` - STRING. The path to install CMake package files (e.g. ``/usr/lib/cmake/z3``).
|
||||||
* ``CMAKE_INSTALL_API_BINDINGS_DOC`` - STRING. The path to install documentation for API bindings.
|
* ``CMAKE_INSTALL_API_BINDINGS_DOC`` - STRING. The path to install documentation for API bindings.
|
||||||
* ``ENABLE_TRACING_FOR_NON_DEBUG`` - BOOL. If set to ``TRUE`` enable tracing in non-debug builds, if set to ``FALSE`` disable tracing in non-debug builds. Note in debug builds tracing is always enabled.
|
* ``Z3_ENABLE_TRACING_FOR_NON_DEBUG`` - BOOL. If set to ``TRUE`` enable tracing in non-debug builds, if set to ``FALSE`` disable tracing in non-debug builds. Note in debug builds tracing is always enabled.
|
||||||
* ``BUILD_LIBZ3_SHARED`` - BOOL. If set to ``TRUE`` build libz3 as a shared library otherwise build as a static library.
|
* ``BUILD_LIBZ3_SHARED`` - BOOL. If set to ``TRUE`` build libz3 as a shared library otherwise build as a static library.
|
||||||
* ``ENABLE_EXAMPLE_TARGETS`` - BOOL. If set to ``TRUE`` add the build targets for building the API examples.
|
* ``Z3_ENABLE_EXAMPLE_TARGETS`` - BOOL. If set to ``TRUE`` add the build targets for building the API examples.
|
||||||
* ``USE_LIB_GMP`` - BOOL. If set to ``TRUE`` use the GNU multiple precision library. If set to ``FALSE`` use an internal implementation.
|
* ``USE_LIB_GMP`` - BOOL. If set to ``TRUE`` use the GNU multiple precision library. If set to ``FALSE`` use an internal implementation.
|
||||||
* ``PYTHON_EXECUTABLE`` - STRING. The python executable to use during the build.
|
* ``PYTHON_EXECUTABLE`` - STRING. The python executable to use during the build.
|
||||||
* ``BUILD_PYTHON_BINDINGS`` - BOOL. If set to ``TRUE`` then Z3's python bindings will be built.
|
* ``BUILD_PYTHON_BINDINGS`` - BOOL. If set to ``TRUE`` then Z3's python bindings will be built.
|
||||||
|
@ -256,10 +256,10 @@ The following useful options can be passed to CMake whilst configuring.
|
||||||
* ``INSTALL_JAVA_BINDINGS`` - BOOL. If set to ``TRUE`` and ``BUILD_JAVA_BINDINGS`` is ``TRUE`` then running the ``install`` target will install Z3's Java bindings.
|
* ``INSTALL_JAVA_BINDINGS`` - BOOL. If set to ``TRUE`` and ``BUILD_JAVA_BINDINGS`` is ``TRUE`` then running the ``install`` target will install Z3's Java bindings.
|
||||||
* ``Z3_JAVA_JAR_INSTALLDIR`` - STRING. The path to directory to install the Z3 Java ``.jar`` file. This path should be relative to ``CMAKE_INSTALL_PREFIX``.
|
* ``Z3_JAVA_JAR_INSTALLDIR`` - STRING. The path to directory to install the Z3 Java ``.jar`` file. This path should be relative to ``CMAKE_INSTALL_PREFIX``.
|
||||||
* ``Z3_JAVA_JNI_LIB_INSTALLDIRR`` - STRING. The path to directory to install the Z3 Java JNI bridge library. This path should be relative to ``CMAKE_INSTALL_PREFIX``.
|
* ``Z3_JAVA_JNI_LIB_INSTALLDIRR`` - STRING. The path to directory to install the Z3 Java JNI bridge library. This path should be relative to ``CMAKE_INSTALL_PREFIX``.
|
||||||
* ``INCLUDE_GIT_DESCRIBE`` - BOOL. If set to ``TRUE`` and the source tree of Z3 is a git repository then the output of ``git describe`` will be included in the build.
|
* ``Z3_INCLUDE_GIT_DESCRIBE`` - BOOL. If set to ``TRUE`` and the source tree of Z3 is a git repository then the output of ``git describe`` will be included in the build.
|
||||||
* ``INCLUDE_GIT_HASH`` - BOOL. If set to ``TRUE`` and the source tree of Z3 is a git repository then the git hash will be included in the build.
|
* ``Z3_INCLUDE_GIT_HASH`` - BOOL. If set to ``TRUE`` and the source tree of Z3 is a git repository then the git hash will be included in the build.
|
||||||
* ``BUILD_DOCUMENTATION`` - BOOL. If set to ``TRUE`` then documentation for the API bindings can be built by invoking the ``api_docs`` target.
|
* ``Z3_BUILD_DOCUMENTATION`` - BOOL. If set to ``TRUE`` then documentation for the API bindings can be built by invoking the ``api_docs`` target.
|
||||||
* ``INSTALL_API_BINDINGS_DOCUMENTATION`` - BOOL. If set to ``TRUE`` and ``BUILD_DOCUMENTATION` is ``TRUE`` then documentation for API bindings will be installed
|
* ``Z3_INSTALL_API_BINDINGS_DOCUMENTATION`` - BOOL. If set to ``TRUE`` and ``Z3_BUILD_DOCUMENTATION` is ``TRUE`` then documentation for API bindings will be installed
|
||||||
when running the ``install`` target.
|
when running the ``install`` target.
|
||||||
* ``ALWAYS_BUILD_DOCS`` - BOOL. If set to ``TRUE`` and ``BUILD_DOCUMENTATION`` is ``TRUE`` then documentation for API bindings will always be built.
|
* ``ALWAYS_BUILD_DOCS`` - BOOL. If set to ``TRUE`` and ``BUILD_DOCUMENTATION`` is ``TRUE`` then documentation for API bindings will always be built.
|
||||||
Disabling this is useful for faster incremental builds. The documentation can be manually built by invoking the ``api_docs`` target.
|
Disabling this is useful for faster incremental builds. The documentation can be manually built by invoking the ``api_docs`` target.
|
||||||
|
|
|
@ -78,14 +78,14 @@ set_property(DIRECTORY APPEND PROPERTY
|
||||||
"${DOC_DEST_DIR}"
|
"${DOC_DEST_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
option(INSTALL_API_BINDINGS_DOCUMENTATION "Install documentation for API bindings" ON)
|
option(Z3_INSTALL_API_BINDINGS_DOCUMENTATION "Install documentation for API bindings" ON)
|
||||||
set(CMAKE_INSTALL_API_BINDINGS_DOC
|
set(CMAKE_INSTALL_API_BINDINGS_DOC
|
||||||
"${CMAKE_INSTALL_DOCDIR}"
|
"${CMAKE_INSTALL_DOCDIR}"
|
||||||
CACHE
|
CACHE
|
||||||
PATH
|
PATH
|
||||||
"Path to install documentation for API bindings"
|
"Path to install documentation for API bindings"
|
||||||
)
|
)
|
||||||
if (INSTALL_API_BINDINGS_DOCUMENTATION)
|
if (Z3_INSTALL_API_BINDINGS_DOCUMENTATION)
|
||||||
install(
|
install(
|
||||||
DIRECTORY "${DOC_DEST_DIR}"
|
DIRECTORY "${DOC_DEST_DIR}"
|
||||||
DESTINATION "${CMAKE_INSTALL_API_BINDINGS_DOC}"
|
DESTINATION "${CMAKE_INSTALL_API_BINDINGS_DOC}"
|
||||||
|
|
Loading…
Reference in a new issue