[all-commits] [llvm/llvm-project] ac0d1d: [cmake] Support custom package install paths

John Ericson via All-commits all-commits at lists.llvm.org
Mon Jul 25 14:03:05 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac0d1d5c7b7e0d572e35e31e0b59be765ca42a48
      https://github.com/llvm/llvm-project/commit/ac0d1d5c7b7e0d572e35e31e0b59be765ca42a48
  Author: John Ericson <John.Ericson at Obsidian.Systems>
  Date:   2022-07-25 (Mon, 25 Jul 2022)

  Changed paths:
    M clang/cmake/modules/CMakeLists.txt
    M cmake/Modules/FindPrefixFromConfig.cmake
    A cmake/Modules/GNUInstallPackageDir.cmake
    M flang/cmake/modules/CMakeLists.txt
    M lld/cmake/modules/CMakeLists.txt
    M llvm/cmake/modules/AddLLVM.cmake
    M llvm/cmake/modules/CMakeLists.txt
    M mlir/cmake/modules/CMakeLists.txt
    M polly/cmake/CMakeLists.txt

  Log Message:
  -----------
  [cmake] Support custom package install paths

Firstly, we we make an additional GNUInstallDirs-style variable. With
NixOS, for example, this is crucial as we want those to go in
`${dev}/lib/cmake` not `${out}/lib/cmake` as that would a cmake subdir
of the "regular" libdir, which is installed even when no one needs to do
any development.

Secondly, we make *Config.cmake robust to absolute package install
paths. We for NixOS will in fact be passing them absolute paths to make
the `${dev}` vs `${out}` distinction mentioned above, and the
GNUInstallDirs-style variables are suposed to support absolute paths in
general so it's good practice besides the NixOS use-case.

Thirdly, we make `${project}_INSTALL_PACKAGE_DIR` CACHE PATHs like other
install dirs are.

Reviewed By: sebastian-ne

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




More information about the All-commits mailing list