[llvm] 0b5d81e - Automatically configure MLIR when flang is enabled
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Wed May 27 00:32:04 PDT 2020
Author: Mehdi Amini
Date: 2020-05-27T07:31:49Z
New Revision: 0b5d81e6bbad1656c2e059621948967aaeaa5702
URL: https://github.com/llvm/llvm-project/commit/0b5d81e6bbad1656c2e059621948967aaeaa5702
DIFF: https://github.com/llvm/llvm-project/commit/0b5d81e6bbad1656c2e059621948967aaeaa5702.diff
LOG: Automatically configure MLIR when flang is enabled
This is more friendly than the "Unknown CMake command “mlir_tablegen”."
that would be issued instead.
Differential Revision: https://reviews.llvm.org/D80359
Added:
Modified:
llvm/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 06b8646ca37b..b224393ac16a 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -81,6 +81,10 @@ set(LLVM_ENABLE_PROJECTS "" CACHE STRING
if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
set( LLVM_ENABLE_PROJECTS ${LLVM_ALL_PROJECTS})
endif()
+if ("flang" IN_LIST LLVM_ENABLE_PROJECTS AND NOT "mlir" IN_LIST LLVM_ENABLE_PROJECTS)
+ message(STATUS "Enabling MLIR as a dependency to flang")
+ list(APPEND LLVM_ENABLE_PROJECTS "mlir")
+endif()
# LLVM_ENABLE_PROJECTS_USED is `ON` if the user has ever used the
# `LLVM_ENABLE_PROJECTS` CMake cache variable. This exists for
More information about the llvm-commits
mailing list