This way, downstream projects don't have to invoke find_package(ZLIB)
reducing the amount of boilerplate.
Differential Revision: https://reviews.llvm.org/D84691
option(CLANG_ENABLE_BOOTSTRAP "Generate the clang bootstrap target" OFF)
option(LLVM_ENABLE_LIBXML2 "Use libxml2 if available." ON)
- if(LLVM_ENABLE_ZLIB)
- find_package(ZLIB)
- endif()
-
include(AddLLVM)
include(TableGen)
include(HandleLLVMOptions)
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
- if(LLVM_ENABLE_ZLIB)
- find_package(ZLIB)
- endif()
-
include(AddLLVM)
include(TableGen)
include(HandleLLVMOptions)
# CMake modules to be in that directory as well.
list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
-if(LLVM_ENABLE_ZLIB)
- find_package(ZLIB)
-endif()
-
include(AddLLVM)
include(TableGen)
include(HandleLLVMOptions)
set(LLVM_ENABLE_UNWIND_TABLES @LLVM_ENABLE_UNWIND_TABLES@)
set(LLVM_ENABLE_ZLIB @LLVM_ENABLE_ZLIB@)
+if(LLVM_ENABLE_ZLIB)
+ find_package(ZLIB)
+endif()
set(LLVM_LIBXML2_ENABLED @LLVM_LIBXML2_ENABLED@)
list(APPEND CMAKE_MODULE_PATH "${MLIR_CMAKE_DIR}")
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
-if(LLVM_ENABLE_ZLIB)
- find_package(ZLIB)
-endif()
-
include(TableGen)
include(AddLLVM)
include(AddMLIR)