diff options
Diffstat (limited to 'clang/test/CMakeLists.txt')
-rw-r--r-- | clang/test/CMakeLists.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt index 334a904..38bbc5b 100644 --- a/clang/test/CMakeLists.txt +++ b/clang/test/CMakeLists.txt @@ -9,6 +9,15 @@ endif () string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) +if(CLANG_BUILT_STANDALONE) + # Set HAVE_LIBZ according to recorded LLVM_ENABLE_ZLIB value. This + # value is forced to 0 if zlib was not found, so it is fine to use it + # instead of HAVE_LIBZ (not recorded). + if(LLVM_ENABLE_ZLIB) + set(HAVE_LIBZ 1) + endif() +endif() + llvm_canonicalize_cmake_booleans( CLANG_BUILD_EXAMPLES CLANG_ENABLE_ARCMT @@ -16,7 +25,7 @@ llvm_canonicalize_cmake_booleans( CLANG_SPAWN_CC1 ENABLE_BACKTRACES ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER - LLVM_ENABLE_ZLIB + HAVE_LIBZ LLVM_ENABLE_PER_TARGET_RUNTIME_DIR LLVM_ENABLE_PLUGINS LLVM_ENABLE_THREADS) |