aboutsummaryrefslogtreecommitdiff
path: root/clang/CMakeLists.txt
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2017-08-27 20:24:23 +0000
committerMehdi Amini <joker.eph@gmail.com>2017-08-27 20:24:23 +0000
commit8e8f25b1a5eb1d73e0f52bd6b33786478a9464b2 (patch)
tree133898aec4040583cb0a650faa1fe2914d9c994b /clang/CMakeLists.txt
parentf23847604b2db5a88f0b0b88a2380407b3e7d03f (diff)
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") llvm-svn: 311858
Diffstat (limited to 'clang/CMakeLists.txt')
-rw-r--r--clang/CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index c1da2cff1b14..a4a0c2c63b7f 100644
--- a/clang/CMakeLists.txt
+++ b/clang/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()