Skip to content

Commit b50f850

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

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,12 @@ include(${PROJECT_SOURCE_DIR}/cmake/compiler_lto.cmake)
392392
################################################################################
393393
# Control flow integrity
394394
################################################################################
395-
option(ENABLE_CFI "Enable control flow integrity checking" OFF)
396-
if (ENABLE_CFI)
395+
option(Z3_ENABLE_CFI "Enable control flow integrity checking" OFF)
396+
if (Z3_ENABLE_CFI)
397397
set(build_types_with_cfi "RELEASE" "RELWITHDEBINFO")
398-
if (NOT LINK_TIME_OPTIMIZATION)
398+
if (NOT Z3_LINK_TIME_OPTIMIZATION)
399399
message(FATAL_ERROR "Cannot enable control flow integrity checking without link-time optimization."
400-
"You should set LINK_TIME_OPTIMIZATION to ON or ENABLE_CFI to OFF.")
400+
"You should set Z3_LINK_TIME_OPTIMIZATION to ON or Z3_ENABLE_CFI to OFF.")
401401
endif()
402402
if (DEFINED CMAKE_CONFIGURATION_TYPES)
403403
# Multi configuration generator
@@ -417,7 +417,7 @@ if (ENABLE_CFI)
417417
endforeach()
418418
else()
419419
message(FATAL_ERROR "Can't enable control flow integrity for compiler \"${CMAKE_CXX_COMPILER_ID}\"."
420-
"You should set ENABLE_CFI to OFF or use Clang or MSVC to compile.")
420+
"You should set Z3_ENABLE_CFI to OFF or use Clang or MSVC to compile.")
421421
endif()
422422
endif()
423423

README-CMake.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,11 @@ The following useful options can be passed to CMake whilst configuring.
261261
* ``Z3_BUILD_DOCUMENTATION`` - BOOL. If set to ``TRUE`` then documentation for the API bindings can be built by invoking the ``api_docs`` target.
262262
* ``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.
264-
* ``ALWAYS_BUILD_DOCS`` - BOOL. If set to ``TRUE`` and ``BUILD_DOCUMENTATION`` is ``TRUE`` then documentation for API bindings will always be built.
264+
* ``Z3_ALWAYS_BUILD_DOCS`` - BOOL. If set to ``TRUE`` and ``Z3_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.
266-
* ``LINK_TIME_OPTIMIZATION`` - BOOL. If set to ``TRUE`` link time optimization will be enabled.
267-
* ``ENABLE_CFI`` - BOOL. If set to ``TRUE`` will enable Control Flow Integrity security checks. This is only supported by MSVC and Clang and will
268-
fail on other compilers. This requires LINK_TIME_OPTIMIZATION to also be enabled.
266+
* ``Z3_LINK_TIME_OPTIMIZATION`` - BOOL. If set to ``TRUE`` link time optimization will be enabled.
267+
* ``Z3_ENABLE_CFI`` - BOOL. If set to ``TRUE`` will enable Control Flow Integrity security checks. This is only supported by MSVC and Clang and will
268+
fail on other compilers. This requires Z3_LINK_TIME_OPTIMIZATION to also be enabled.
269269
* ``Z3_API_LOG_SYNC`` - BOOL. If set to ``TRUE`` will enable experimental API log sync feature.
270270
* ``WARNINGS_AS_ERRORS`` - STRING. If set to ``TRUE`` compiler warnings will be treated as errors. If set to ``False`` compiler warnings will not be treated as errors.
271271
If set to ``SERIOUS_ONLY`` a subset of compiler warnings will be treated as errors.

cmake/compiler_lto.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
option(LINK_TIME_OPTIMIZATION "Use link time optimiziation" OFF)
1+
option(Z3_LINK_TIME_OPTIMIZATION "Use link time optimiziation" OFF)
22

3-
if (LINK_TIME_OPTIMIZATION)
3+
if (Z3_LINK_TIME_OPTIMIZATION)
44
message(STATUS "LTO enabled")
55
set(build_types_with_lto "RELEASE" "RELWITHDEBINFO")
66
if (DEFINED CMAKE_CONFIGURATION_TYPES)
@@ -12,7 +12,7 @@ if (LINK_TIME_OPTIMIZATION)
1212
list(FIND build_types_with_lto "${_build_type_upper}" _index)
1313
if ("${_index}" EQUAL -1)
1414
message(FATAL_ERROR "Configuration ${CMAKE_BUILD_TYPE} does not support LTO."
15-
"You should set LINK_TIME_OPTIMIZATION to OFF.")
15+
"You should set Z3_LINK_TIME_OPTIMIZATION to OFF.")
1616
endif()
1717
endif()
1818

@@ -27,7 +27,7 @@ if (LINK_TIME_OPTIMIZATION)
2727
set(_lto_linker_flag "/LTCG")
2828
else()
2929
message(FATAL_ERROR "Can't enable LTO for compiler \"${CMAKE_CXX_COMPILER_ID}\"."
30-
"You should set LINK_TIME_OPTIMIZATION to OFF.")
30+
"You should set Z3_LINK_TIME_OPTIMIZATION to OFF.")
3131
endif()
3232
CHECK_CXX_COMPILER_FLAG("${_lto_compiler_flag}" HAS_LTO)
3333
if (NOT HAS_LTO)

contrib/ci/scripts/build_z3_cmake.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ fi
4141

4242
# Use link time optimziation?
4343
if [ "X${USE_LTO}" = "X1" ]; then
44-
ADDITIONAL_Z3_OPTS+=('-DLINK_TIME_OPTIMIZATION=ON')
44+
ADDITIONAL_Z3_OPTS+=('-DZ3_LINK_TIME_OPTIMIZATION=ON')
4545
else
46-
ADDITIONAL_Z3_OPTS+=('-DLINK_TIME_OPTIMIZATION=OFF')
46+
ADDITIONAL_Z3_OPTS+=('-DZ3_LINK_TIME_OPTIMIZATION=OFF')
4747
fi
4848

4949
# Build API docs?

doc/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ else()
4141
list(APPEND JAVA_API_OPTIONS "--no-java")
4242
endif()
4343

44-
option(ALWAYS_BUILD_DOCS "Always build documentation for API bindings" ON)
45-
if (ALWAYS_BUILD_DOCS)
44+
option(Z3_ALWAYS_BUILD_DOCS "Always build documentation for API bindings" ON)
45+
if (Z3_ALWAYS_BUILD_DOCS)
4646
set(ALWAYS_BUILD_DOCS_ARG "ALL")
4747
else()
4848
set(ALWAYS_BUILD_DOCS_ARG "")
@@ -51,7 +51,7 @@ else()
5151
message(WARNING "Building documentation for API bindings is not part of the"
5252
" all target. This may result in stale files being installed when running"
5353
" the install target. You should run the api_docs target before running"
54-
" the install target. Alternatively Set ALWAYS_BUILD_DOCS to ON to"
54+
" the install target. Alternatively Set Z3_ALWAYS_BUILD_DOCS to ON to"
5555
" automatically build documentation when running the install target."
5656
)
5757
endif()

0 commit comments

Comments
 (0)