[flang-commits] [PATCH] D87083: [cmake] Use absolute paths for modules search
Pete Steinfeld via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu Sep 3 08:02:13 PDT 2020
PeteSteinfeld requested changes to this revision.
PeteSteinfeld added a comment.
This revision now requires changes to proceed.
Thanks for working on this!
But I couldn't get it working for me. Here's what I tried.
I started with an existing full build that includes llvm and mlir. The full path of this build is /local/home/psteinfeld/master/b4/build/. I have a script that does an out-of tree build based on this full build. Here's the script:
#!/bin/bash
cmake -G Ninja \
-DFLANG_ENABLE_WERROR=On \
-D LLVM_DIR=/local/home/psteinfeld/master/b4/build/lib/cmake/llvm \
-D MLIR_DIR=/local/home/psteinfeld/master/b4/build/lib/cmake/mlir \
-DCMAKE_BUILD_TYPE=Release ..
I then created a script that uses relative paths. Here's the contents of my new script:
#!/bin/bash
cmake -G Ninja \
-DFLANG_ENABLE_WERROR=On \
-D LLVM_DIR=../../../b4/build/lib/cmake/llvm \
-D MLIR_DIR=../../../b4/build/lib/cmake/mlir \
-DCMAKE_BUILD_TYPE=Release ..
I then downloaded the source into the directory /local/home/psteinfeld/master/diana/. I then "cd"ed to the "flang" directory and created a directory called "build" and did a "cd build". At this point, doing "pwd" yields "/local/home/psteinfeld/master/diana/flang/build". I then ran my new script. Running it produced the following errors:
...
- Performing Test C_SUPPORTS_FDATA_SECTIONS
- Performing Test C_SUPPORTS_FDATA_SECTIONS - Success
- Performing Test CXX_SUPPORTS_FDATA_SECTIONS
- Performing Test CXX_SUPPORTS_FDATA_SECTIONS - Success
CMake Error at CMakeLists.txt:81 (find_package):
Could not find a package configuration file provided by "MLIR" with any of
the following names:
MLIRConfig.cmake
mlir-config.cmake
Add the installation prefix of "MLIR" to CMAKE_PREFIX_PATH or set
"MLIR_DIR" to a directory containing one of the above files. If "MLIR"
provides a separate development package or SDK, be sure it has been
installed.
- Configuring incomplete, errors occurred!
See also "/local/home/psteinfeld/master/diana/flang/build/CMakeFiles/CMakeOutput.log".
See also "/local/home/psteinfeld/master/diana/flang/build/CMakeFiles/CMakeError.log".
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87083/new/
https://reviews.llvm.org/D87083
More information about the flang-commits
mailing list