Skip to content

Commit e9d9792

Browse files
rename additional build options #2709
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 3ab9a1c commit e9d9792

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

CMakeLists.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,24 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
5757
################################################################################
5858
include(${PROJECT_SOURCE_DIR}/cmake/git_utils.cmake)
5959
macro(disable_git_describe)
60-
message(WARNING "Disabling INCLUDE_GIT_DESCRIBE")
61-
set(INCLUDE_GIT_DESCRIBE OFF CACHE BOOL "Include git describe output in version output" FORCE)
60+
message(WARNING "Disabling Z3_INCLUDE_GIT_DESCRIBE")
61+
set(Z3_INCLUDE_GIT_DESCRIBE OFF CACHE BOOL "Include git describe output in version output" FORCE)
6262
endmacro()
6363
macro(disable_git_hash)
64-
message(WARNING "Disabling INCLUDE_GIT_HASH")
65-
set(INCLUDE_GIT_HASH OFF CACHE BOOL "Include git hash in version output" FORCE)
64+
message(WARNING "Disabling Z3_INCLUDE_GIT_HASH")
65+
set(Z3_INCLUDE_GIT_HASH OFF CACHE BOOL "Include git hash in version output" FORCE)
6666
unset(Z3GITHASH) # Used in configure_file()
6767
endmacro()
68-
option(INCLUDE_GIT_HASH "Include git hash in version output" ON)
69-
option(INCLUDE_GIT_DESCRIBE "Include git describe output in version output" ON)
68+
option(Z3_INCLUDE_GIT_HASH "Include git hash in version output" ON)
69+
option(Z3_INCLUDE_GIT_DESCRIBE "Include git describe output in version output" ON)
7070

7171
set(GIT_DIR "${PROJECT_SOURCE_DIR}/.git")
7272
if (EXISTS "${GIT_DIR}")
7373
# Try to make CMake configure depend on the current git HEAD so that
7474
# a re-configure is triggered when the HEAD changes.
7575
add_git_dir_dependency("${PROJECT_SOURCE_DIR}" ADD_GIT_DEP_SUCCESS)
7676
if (ADD_GIT_DEP_SUCCESS)
77-
if (INCLUDE_GIT_HASH)
77+
if (Z3_INCLUDE_GIT_HASH)
7878
get_git_head_hash("${GIT_DIR}" Z3GITHASH)
7979
if (NOT Z3GITHASH)
8080
message(WARNING "Failed to get Git hash")
@@ -87,7 +87,7 @@ if (EXISTS "${GIT_DIR}")
8787
message(STATUS "Not using Git hash in version output")
8888
unset(Z3GITHASH) # Used in configure_file()
8989
endif()
90-
if (INCLUDE_GIT_DESCRIBE)
90+
if (Z3_INCLUDE_GIT_DESCRIBE)
9191
get_git_head_describe("${GIT_DIR}" Z3_GIT_DESCRIPTION)
9292
if (NOT Z3_GIT_DESCRIPTION)
9393
message(WARNING "Failed to get Git description")
@@ -267,7 +267,7 @@ if (Z3_API_LOG_SYNC)
267267
list(APPEND Z3_COMPONENT_CXX_DEFINES "-DZ3_LOG_SYNC")
268268
message(STATUS "Using Z3_API_LOG_SYNC")
269269
else()
270-
message(STATUS "Not using API_LOG_SYNC")
270+
message(STATUS "Not using Z3_API_LOG_SYNC")
271271
endif()
272272

273273
################################################################################
@@ -361,8 +361,8 @@ endif()
361361
################################################################################
362362
# Tracing
363363
################################################################################
364-
option(ENABLE_TRACING_FOR_NON_DEBUG "Enable tracing in non-debug builds." OFF)
365-
if (ENABLE_TRACING_FOR_NON_DEBUG)
364+
option(Z3_ENABLE_TRACING_FOR_NON_DEBUG "Enable tracing in non-debug builds." OFF)
365+
if (Z3_ENABLE_TRACING_FOR_NON_DEBUG)
366366
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_TRACE")
367367
else()
368368
# Tracing is always enabled in debug builds
@@ -613,16 +613,16 @@ install(
613613
################################################################################
614614
# Examples
615615
################################################################################
616-
option(ENABLE_EXAMPLE_TARGETS "Build Z3 api examples" ON)
617-
if (ENABLE_EXAMPLE_TARGETS)
616+
option(Z3_ENABLE_EXAMPLE_TARGETS "Build Z3 api examples" ON)
617+
if (Z3_ENABLE_EXAMPLE_TARGETS)
618618
add_subdirectory(examples)
619619
endif()
620620

621621
################################################################################
622622
# Documentation
623623
################################################################################
624-
option(BUILD_DOCUMENTATION "Build API documentation" OFF)
625-
if (BUILD_DOCUMENTATION)
624+
option(Z3_BUILD_DOCUMENTATION "Build API documentation" OFF)
625+
if (Z3_BUILD_DOCUMENTATION)
626626
message(STATUS "Building documentation enabled")
627627
add_subdirectory(doc)
628628
else()

README-CMake.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ The following useful options can be passed to CMake whilst configuring.
241241
* ``CMAKE_INSTALL_PYTHON_PKG_DIR`` - STRING. The path to install the z3 python bindings. This can be relative (to ``CMAKE_INSTALL_PREFIX``) or absolute.
242242
* ``CMAKE_INSTALL_Z3_CMAKE_PACKAGE_DIR`` - STRING. The path to install CMake package files (e.g. ``/usr/lib/cmake/z3``).
243243
* ``CMAKE_INSTALL_API_BINDINGS_DOC`` - STRING. The path to install documentation for API bindings.
244-
* ``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.
244+
* ``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.
245245
* ``BUILD_LIBZ3_SHARED`` - BOOL. If set to ``TRUE`` build libz3 as a shared library otherwise build as a static library.
246-
* ``ENABLE_EXAMPLE_TARGETS`` - BOOL. If set to ``TRUE`` add the build targets for building the API examples.
246+
* ``Z3_ENABLE_EXAMPLE_TARGETS`` - BOOL. If set to ``TRUE`` add the build targets for building the API examples.
247247
* ``USE_LIB_GMP`` - BOOL. If set to ``TRUE`` use the GNU multiple precision library. If set to ``FALSE`` use an internal implementation.
248248
* ``PYTHON_EXECUTABLE`` - STRING. The python executable to use during the build.
249249
* ``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.
256256
* ``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.
257257
* ``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``.
258258
* ``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``.
259-
* ``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.
260-
* ``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.
261-
* ``BUILD_DOCUMENTATION`` - BOOL. If set to ``TRUE`` then documentation for the API bindings can be built by invoking the ``api_docs`` target.
262-
* ``INSTALL_API_BINDINGS_DOCUMENTATION`` - BOOL. If set to ``TRUE`` and ``BUILD_DOCUMENTATION` is ``TRUE`` then documentation for API bindings will be installed
259+
* ``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.
260+
* ``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.
261+
* ``Z3_BUILD_DOCUMENTATION`` - BOOL. If set to ``TRUE`` then documentation for the API bindings can be built by invoking the ``api_docs`` target.
262+
* ``Z3_INSTALL_API_BINDINGS_DOCUMENTATION`` - BOOL. If set to ``TRUE`` and ``Z3_BUILD_DOCUMENTATION` is ``TRUE`` then documentation for API bindings will be installed
263263
when running the ``install`` target.
264264
* ``ALWAYS_BUILD_DOCS`` - BOOL. If set to ``TRUE`` and ``BUILD_DOCUMENTATION`` is ``TRUE`` then documentation for API bindings will always be built.
265265
Disabling this is useful for faster incremental builds. The documentation can be manually built by invoking the ``api_docs`` target.

doc/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ set_property(DIRECTORY APPEND PROPERTY
7878
"${DOC_DEST_DIR}"
7979
)
8080

81-
option(INSTALL_API_BINDINGS_DOCUMENTATION "Install documentation for API bindings" ON)
81+
option(Z3_INSTALL_API_BINDINGS_DOCUMENTATION "Install documentation for API bindings" ON)
8282
set(CMAKE_INSTALL_API_BINDINGS_DOC
8383
"${CMAKE_INSTALL_DOCDIR}"
8484
CACHE
8585
PATH
8686
"Path to install documentation for API bindings"
8787
)
88-
if (INSTALL_API_BINDINGS_DOCUMENTATION)
88+
if (Z3_INSTALL_API_BINDINGS_DOCUMENTATION)
8989
install(
9090
DIRECTORY "${DOC_DEST_DIR}"
9191
DESTINATION "${CMAKE_INSTALL_API_BINDINGS_DOC}"

0 commit comments

Comments
 (0)