diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2017-08-27 20:24:23 +0000 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2017-08-27 20:24:23 +0000 |
commit | 2018de5d8f405d6e356a3e97d600e8b2042e3e15 (patch) | |
tree | 868616d803ba3c63809471a922239113c16644a0 /CMakeLists.txt | |
parent | 0682709a5e5c9df240e0fd7bccd8f7115b25506b (diff) | |
download | clang-2018de5d8f405d6e356a3e97d600e8b2042e3e15.tar.gz |
CMake: only try to find the Z3 package when `CLANG_ANALYZER_BUILD_Z3` is ON
This avoids the spurious message:
Could NOT find Z3 (missing: Z3_LIBRARIES Z3_INCLUDE_DIR) (Required is at least version "4.5")
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c1da2cff1b..a4a0c2c63b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,8 +187,6 @@ if (LIBXML2_FOUND) set(CLANG_HAVE_LIBXML 1) endif() -find_package(Z3 4.5) - include(CheckIncludeFile) check_include_file(sys/resource.h CLANG_HAVE_RLIMITS) @@ -384,6 +382,7 @@ if(NOT CLANG_ENABLE_STATIC_ANALYZER AND (CLANG_ENABLE_ARCMT OR CLANG_ANALYZER_BU endif() if(CLANG_ANALYZER_BUILD_Z3) + find_package(Z3 4.5) if(Z3_FOUND) set(CLANG_ANALYZER_WITH_Z3 1) else() |