OSDN Git Service

Use find_library for ncurses
authorHarmen Stoppels <harmenstoppels@gmail.com>
Tue, 18 Aug 2020 02:51:11 +0000 (19:51 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 18 Aug 2020 02:52:52 +0000 (19:52 -0700)
commita52173a3e56553d7b795bcf3cdadcf6433117107
tree33f15902a25589512761009775947e5b3ff19454
parentc7ec3a7e338cd8e58424a66d29162e9b6a5847f7
Use find_library for ncurses

Currently it is hard to avoid having LLVM link to the system install of
ncurses, since it uses check_library_exists to find e.g. libtinfo and
not find_library or find_package.

With this change the ncurses lib is found with find_library, which also
considers CMAKE_PREFIX_PATH. This solves an issue for the spack package
manager, where we want to use the zlib installed by spack, and spack
provides the CMAKE_PREFIX_PATH for it.

This is a similar change as https://reviews.llvm.org/D79219, which just
landed in master.

Differential revision: https://reviews.llvm.org/D85820
compiler-rt/cmake/config-ix.cmake
compiler-rt/lib/xray/tests/CMakeLists.txt
lldb/source/Core/CMakeLists.txt
llvm/cmake/config-ix.cmake
llvm/include/llvm/Config/config.h.cmake
llvm/lib/Support/CMakeLists.txt
llvm/lib/Support/Unix/Process.inc
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn