[all-commits] [llvm/llvm-project] 3c7bfb: [CMake] Use find_library for ncurses

Petr Hosek via All-commits all-commits at lists.llvm.org
Mon Aug 31 20:06:54 PDT 2020


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

  Changed paths:
    M compiler-rt/cmake/config-ix.cmake
    M compiler-rt/lib/xray/tests/CMakeLists.txt
    M lldb/source/Core/CMakeLists.txt
    M llvm/CMakeLists.txt
    M llvm/cmake/config-ix.cmake
    M llvm/include/llvm/Config/config.h.cmake
    M llvm/lib/Support/CMakeLists.txt
    M llvm/lib/Support/Unix/Process.inc
    M llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn

  Log Message:
  -----------
  [CMake] 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.

Patch By: haampie

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




More information about the All-commits mailing list