HomePhabricator

[cmake] Use absolute paths for modules search

Authored by rovka on Thu, Sep 3, 4:39 AM.

Description

[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

Details

Committed
rovkaWed, Sep 9, 4:56 AM
Differential Revision
D87083: [cmake] Use absolute paths for modules search
Parents
rGedf244217a48: [mlir][Linalg] Integration tests for convolutions added.
Branches
Unknown
Tags
Unknown