diff --git a/CMakeLists.txt b/CMakeLists.txt index 57f743708..d23b22ecd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -241,8 +241,8 @@ list(APPEND Z3_COMPONENT_EXTRA_INCLUDE_DIRS ################################################################################ # GNU multiple precision library support ################################################################################ -option(USE_LIB_GMP "Use GNU Multiple Precision Library" OFF) -if (USE_LIB_GMP) +option(Z3_USE_LIB_GMP "Use GNU Multiple Precision Library" OFF) +if (Z3_USE_LIB_GMP) # Because this is off by default we will make the configure fail if libgmp # can't be found find_package(GMP REQUIRED) diff --git a/README-CMake.md b/README-CMake.md index 06f32a599..7ade19844 100644 --- a/README-CMake.md +++ b/README-CMake.md @@ -244,7 +244,7 @@ The following useful options can be passed to CMake whilst configuring. * ``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. * ``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. +* ``Z3_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. * ``BUILD_PYTHON_BINDINGS`` - BOOL. If set to ``TRUE`` then Z3's python bindings will be built. * ``INSTALL_PYTHON_BINDINGS`` - BOOL. If set to ``TRUE`` and ``BUILD_PYTHON_BINDINGS`` is ``TRUE`` then running the ``install`` target will install Z3's Python bindings. diff --git a/contrib/ci/Dockerfiles/z3_build.Dockerfile b/contrib/ci/Dockerfiles/z3_build.Dockerfile index fd110feb2..02c30a354 100644 --- a/contrib/ci/Dockerfiles/z3_build.Dockerfile +++ b/contrib/ci/Dockerfiles/z3_build.Dockerfile @@ -21,7 +21,7 @@ ARG SANITIZER_PRINT_SUPPRESSIONS ARG TARGET_ARCH ARG TEST_INSTALL ARG UBSAN_BUILD -ARG USE_LIBGMP +ARG Z3_USE_LIBGMP ARG USE_LTO ARG Z3_SRC_DIR=/home/user/z3_src ARG Z3_BUILD_TYPE @@ -50,7 +50,7 @@ ENV \ TARGET_ARCH=${TARGET_ARCH} \ TEST_INSTALL=${TEST_INSTALL} \ UBSAN_BUILD=${UBSAN_BUILD} \ - USE_LIBGMP=${USE_LIBGMP} \ + Z3_USE_LIBGMP=${Z3_USE_LIBGMP} \ USE_LTO=${USE_LTO} \ Z3_SRC_DIR=${Z3_SRC_DIR} \ Z3_BUILD_DIR=/home/user/z3_build \ diff --git a/contrib/ci/README.md b/contrib/ci/README.md index d45dd0345..61e61e45e 100644 --- a/contrib/ci/README.md +++ b/contrib/ci/README.md @@ -37,7 +37,7 @@ the future. * `TARGET_ARCH` - Target architecture (`x86_64` or `i686`) * `TEST_INSTALL` - Test running `install` target (`0` or `1`) * `UBSAN_BUILD` - Do [UndefinedBehaviourSanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) build (`0` or `1`) -* `USE_LIBGMP` - Use [GNU multiple precision library](https://gmplib.org/) (`0` or `1`) +* `Z3_USE_LIBGMP` - Use [GNU multiple precision library](https://gmplib.org/) (`0` or `1`) * `USE_LTO` - Link binaries using link time optimization (`0` or `1`) * `Z3_BUILD_TYPE` - CMake build type (`RelWithDebInfo`, `Release`, `Debug`, or `MinSizeRel`) * `Z3_CMAKE_GENERATOR` - CMake generator (`Ninja` or `Unix Makefiles`) diff --git a/contrib/ci/scripts/build_z3_cmake.sh b/contrib/ci/scripts/build_z3_cmake.sh index bf1376eb4..3715da727 100755 --- a/contrib/ci/scripts/build_z3_cmake.sh +++ b/contrib/ci/scripts/build_z3_cmake.sh @@ -12,7 +12,7 @@ set -o pipefail : ${Z3_BUILD_TYPE?"Z3_BUILD_TYPE must be specified"} : ${Z3_CMAKE_GENERATOR?"Z3_CMAKE_GENERATOR must be specified"} : ${Z3_STATIC_BUILD?"Z3_STATIC_BUILD must be specified"} -: ${USE_LIBGMP?"USE_LIBGMP must be specified"} +: ${Z3_USE_LIBGMP?"Z3_USE_LIBGMP must be specified"} : ${BUILD_DOCS?"BUILD_DOCS must be specified"} : ${PYTHON_EXECUTABLE?"PYTHON_EXECUTABLE must be specified"} : ${PYTHON_BINDINGS?"PYTHON_BINDINGS must be specified"} @@ -33,10 +33,10 @@ else fi # Use LibGMP? -if [ "X${USE_LIBGMP}" = "X1" ]; then - ADDITIONAL_Z3_OPTS+=('-DUSE_LIB_GMP=ON') +if [ "X${Z3_USE_LIBGMP}" = "X1" ]; then + ADDITIONAL_Z3_OPTS+=('-DZ3_USE_LIB_GMP=ON') else - ADDITIONAL_Z3_OPTS+=('-DUSE_LIB_GMP=OFF') + ADDITIONAL_Z3_OPTS+=('-DZ3_USE_LIB_GMP=OFF') fi # Use link time optimziation? diff --git a/contrib/ci/scripts/ci_defaults.sh b/contrib/ci/scripts/ci_defaults.sh index 893f0dade..d524503c7 100644 --- a/contrib/ci/scripts/ci_defaults.sh +++ b/contrib/ci/scripts/ci_defaults.sh @@ -19,7 +19,7 @@ export SANITIZER_PRINT_SUPPRESSIONS="${SANITIZER_PRINT_SUPPRESSIONS:-0}" export TARGET_ARCH="${TARGET_ARCH:-x86_64}" export TEST_INSTALL="${TEST_INSTALL:-1}" export UBSAN_BUILD="${UBSAN_BUILD:-0}" -export USE_LIBGMP="${USE_LIBGMP:-0}" +export Z3_USE_LIBGMP="${Z3_USE_LIBGMP:-0}" export USE_LTO="${USE_LTO:-0}" export Z3_BUILD_TYPE="${Z3_BUILD_TYPE:-RelWithDebInfo}" diff --git a/contrib/ci/scripts/install_deps_osx.sh b/contrib/ci/scripts/install_deps_osx.sh index f9eb5a844..64530e5f3 100755 --- a/contrib/ci/scripts/install_deps_osx.sh +++ b/contrib/ci/scripts/install_deps_osx.sh @@ -30,7 +30,7 @@ if [ "X${Z3_CMAKE_GENERATOR}" = "XNinja" ]; then brew_install_or_upgrade ninja fi -if [ "X${USE_LIBGMP}" = "X1" ]; then +if [ "X${Z3_USE_LIBGMP}" = "X1" ]; then brew_install_or_upgrade gmp fi diff --git a/contrib/ci/scripts/travis_ci_linux_entry_point.sh b/contrib/ci/scripts/travis_ci_linux_entry_point.sh index c89374109..f8a5160dd 100755 --- a/contrib/ci/scripts/travis_ci_linux_entry_point.sh +++ b/contrib/ci/scripts/travis_ci_linux_entry_point.sh @@ -30,8 +30,8 @@ if [ -n "${Z3_CMAKE_GENERATOR}" ]; then BUILD_OPTS+=("--build-arg" "Z3_CMAKE_GENERATOR=${Z3_CMAKE_GENERATOR}") fi -if [ -n "${USE_LIBGMP}" ]; then - BUILD_OPTS+=("--build-arg" "USE_LIBGMP=${USE_LIBGMP}") +if [ -n "${Z3_USE_LIBGMP}" ]; then + BUILD_OPTS+=("--build-arg" "Z3_USE_LIBGMP=${Z3_USE_LIBGMP}") fi if [ -n "${BUILD_DOCS}" ]; then