mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
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
This commit is contained in:
parent
e92c41e0e9
commit
e720318fa6
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user