forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir][cmake] Do not export MLIR_MAIN_SRC_DIR and MLIR_INCLUDE_DIR (l…
…lvm#125842) MLIR_MAIN_SRC_DIR and MLIR_INCLUDE_DIR point to the source directory, which is not installed. As such, the installed MLIRConfig.cmake also should not reference it. The comment indicates that these are needed for mlir_tablegen(), but I don't see any related uses. The motivation for this is the use in flang, where we end up inheriting a meaningless MLIR_MAIN_SRC_DIR from a previous MLIR build, whose source directory doesn't exist anymore, and that cannot be overridden with the correct path, because it's not a cached variable. Instead do what all the other projects do for LLVM_MAIN_SRC_DIR and initialize MLIR_MAIN_SRC_DIR to CMAKE_CURRENT_SOURCE_DIR/../mlir. For MLIR_INCLUDE_DIR there already is an exported MLIR_INCLUDE_DIRS, which can be used instead.
- Loading branch information
Showing
3 changed files
with
5 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters