[all-commits] [llvm/llvm-project] 2b3807: [CMake] Fix ncurses/zlib in LLVM_SYSTEM_LIBS for W...

Petr Hosek via All-commits all-commits at lists.llvm.org
Mon Aug 24 23:06:35 PDT 2020


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

  Changed paths:
    M llvm/lib/Support/CMakeLists.txt

  Log Message:
  -----------
  [CMake] Fix ncurses/zlib in LLVM_SYSTEM_LIBS for Windows GNU

For the Windows GNU platform, CMAKE_FIND_LIBRARY_PREFIXES is a list
containing an empty string, which ended up in a regex capturing group,
which is invalid in CMake's regex engine. With this change, we get the
following:

  set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
  set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib")
  get_system_libname(path/to/libz.dll.a zlib)
  message("${zlib}")

outputs z, as expected.

Patch By: haampie

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




More information about the All-commits mailing list