[all-commits] [llvm/llvm-project] d4b88a: [cmake] Use absolute paths for modules search

Diana via All-commits all-commits at lists.llvm.org
Wed Sep 9 05:00:05 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d4b88ac1658d681e143482336cac27c6a74b8b24
      https://github.com/llvm/llvm-project/commit/d4b88ac1658d681e143482336cac27c6a74b8b24
  Author: Diana Picus <diana.picus at linaro.org>
  Date:   2020-09-09 (Wed, 09 Sep 2020)

  Changed paths:
    M flang/CMakeLists.txt

  Log Message:
  -----------
  [cmake] Use absolute paths for modules search

For out of tree builds, the user generally needs to specify LLVM_DIR and
MLIR_DIR on the command line so that the correct LLVM and MLIR
installations are picked up.

If the provided paths are absolute, everything works fine, however for
buildbots it is customary to work with relative paths, and that makes it
difficult for CMake to find the right modules to include.

This patch changes CMakeLists.txt to convert LLVM_DIR and MLIR_DIR to
absolute paths before adding them to CMAKE_MODULE_PATH. The inputs are
assumed to be relative to the source directory (llvm-project/flang).

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




More information about the All-commits mailing list