[Lldb-commits] [PATCH] D79219: [CMake] Simplify CMake handling for zlib
Harmen Stoppels via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 18 15:09:29 PDT 2020
haampie added inline comments.
================
Comment at: llvm/lib/Support/CMakeLists.txt:217
+ endif()
+ if(CMAKE_SHARED_LIBRARY_PREFIX AND CMAKE_SHARED_LIBRARY_SUFFIX AND
+ zlib_library MATCHES "^${CMAKE_SHARED_LIBRARY_PREFIX}.*${CMAKE_SHARED_LIBRARY_SUFFIX}$")
----------------
This will not work on macOS since cmake will find stub libraries by default (/path/to/libz.tbd), see https://github.com/Kitware/CMake/blob/master/Modules/Platform/Darwin.cmake#L71 for the search order.
Instead you most likely want to use `CMAKE_FIND_LIBRARY_PREFIXES` and `CMAKE_FIND_LIBRARY_SUFFIXES`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79219/new/
https://reviews.llvm.org/D79219
More information about the lldb-commits
mailing list