[all-commits] [llvm/llvm-project] ccbc14: [CMake] Simplify CMake handling for zlib

Petr Hosek via All-commits all-commits at lists.llvm.org
Sat Aug 8 16:45:44 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ccbc1485b55ff4acd21bcfafbf7aec4ed0fd818d
      https://github.com/llvm/llvm-project/commit/ccbc1485b55ff4acd21bcfafbf7aec4ed0fd818d
  Author: Petr Hosek <phosek at google.com>
  Date:   2020-08-08 (Sat, 08 Aug 2020)

  Changed paths:
    M clang/test/CMakeLists.txt
    M clang/test/lit.site.cfg.py.in
    M compiler-rt/test/lit.common.configured.in
    M lld/test/CMakeLists.txt
    M lld/test/lit.site.cfg.py.in
    M lldb/cmake/modules/LLDBStandalone.cmake
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    M llvm/cmake/config-ix.cmake
    M llvm/cmake/modules/LLVMConfig.cmake.in
    M llvm/include/llvm/Config/config.h.cmake
    M llvm/lib/Support/CMakeLists.txt
    M llvm/lib/Support/CRC.cpp
    M llvm/lib/Support/Compression.cpp
    M llvm/test/CMakeLists.txt
    M llvm/test/lit.site.cfg.py.in
    M llvm/unittests/Support/CompressionTest.cpp
    M llvm/utils/gn/secondary/clang/test/BUILD.gn
    M llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
    M llvm/utils/gn/secondary/lld/test/BUILD.gn
    M llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
    M llvm/utils/gn/secondary/llvm/test/BUILD.gn

  Log Message:
  -----------
  [CMake] Simplify CMake handling for zlib

Rather than handling zlib handling manually, use find_package from CMake
to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB,
HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is
set to YES, which requires the distributor to explicitly select whether
zlib is enabled or not. This simplifies the CMake handling and usage in
the rest of the tooling.

This is a reland of abb0075 with all followup changes and fixes that
should address issues that were reported in PR44780.

Differential Revision: https://reviews.llvm.org/D79219




More information about the All-commits mailing list