phosek created this revision.
phosek added reviewers: smeenai, compnerd, mehdi_amini.
Herald added subscribers: llvm-commits, lldb-commits, cfe-commits, msifontes,
jurahul, Kayjukh, grosul1, Joonsoo, stephenneuendorffer, liufengdb, aartbik,
lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen,
jpienaar, rriddle, mgorny.
Herald added projects: clang, LLDB, MLIR, LLVM.
This way, downstream projects don't have to invoke find_package(ZLIB)
reducing the amount of boilerplate.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D84691
Files:
clang/CMakeLists.txt
lld/CMakeLists.txt
lldb/cmake/modules/LLDBStandalone.cmake
llvm/cmake/modules/LLVMConfig.cmake.in
mlir/examples/standalone/CMakeLists.txt
Index: mlir/examples/standalone/CMakeLists.txt
===================================================================
--- mlir/examples/standalone/CMakeLists.txt
+++ mlir/examples/standalone/CMakeLists.txt
@@ -29,10 +29,6 @@
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)
Index: llvm/cmake/modules/LLVMConfig.cmake.in
===================================================================
--- llvm/cmake/modules/LLVMConfig.cmake.in
+++ llvm/cmake/modules/LLVMConfig.cmake.in
@@ -50,6 +50,9 @@
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@)
Index: lldb/cmake/modules/LLDBStandalone.cmake
===================================================================
--- lldb/cmake/modules/LLDBStandalone.cmake
+++ lldb/cmake/modules/LLDBStandalone.cmake
@@ -74,10 +74,6 @@
# 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)
Index: lld/CMakeLists.txt
===================================================================
--- lld/CMakeLists.txt
+++ lld/CMakeLists.txt
@@ -51,10 +51,6 @@
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)
Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -114,10 +114,6 @@
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)
Index: mlir/examples/standalone/CMakeLists.txt
===================================================================
--- mlir/examples/standalone/CMakeLists.txt
+++ mlir/examples/standalone/CMakeLists.txt
@@ -29,10 +29,6 @@
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)
Index: llvm/cmake/modules/LLVMConfig.cmake.in
===================================================================
--- llvm/cmake/modules/LLVMConfig.cmake.in
+++ llvm/cmake/modules/LLVMConfig.cmake.in
@@ -50,6 +50,9 @@
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@)
Index: lldb/cmake/modules/LLDBStandalone.cmake
===================================================================
--- lldb/cmake/modules/LLDBStandalone.cmake
+++ lldb/cmake/modules/LLDBStandalone.cmake
@@ -74,10 +74,6 @@
# 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)
Index: lld/CMakeLists.txt
===================================================================
--- lld/CMakeLists.txt
+++ lld/CMakeLists.txt
@@ -51,10 +51,6 @@
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)
Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -114,10 +114,6 @@
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)
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits