Skip to content

Commit 53074e8

Browse files
maksleventalHoney Goyal
authored andcommitted
[mlir][CMake] enable disabling MLIR_ENABLE_EXECUTION_ENGINE (llvm#171060)
Currently if you pass MLIR_ENABLE_EXECUTION_ENGINE=OFF it's overwritten.
1 parent 5175f52 commit 53074e8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mlir/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,13 @@ set_target_properties(mlir-doc PROPERTIES FOLDER "MLIR/Docs")
124124

125125
# Only enable execution engine if the native target is available.
126126
if(${LLVM_NATIVE_ARCH} IN_LIST LLVM_TARGETS_TO_BUILD)
127-
set(MLIR_ENABLE_EXECUTION_ENGINE 1)
127+
set(MLIR_ENABLE_EXECUTION_ENGINE_default 1)
128128
else()
129-
set(MLIR_ENABLE_EXECUTION_ENGINE 0)
129+
set(MLIR_ENABLE_EXECUTION_ENGINE_default 0)
130130
endif()
131+
option(MLIR_ENABLE_EXECUTION_ENGINE
132+
"Enable building the MLIR Execution Engine."
133+
${MLIR_ENABLE_EXECUTION_ENGINE_default})
131134

132135
# Build the ROCm conversions and run according tests if the AMDGPU backend
133136
# is available.

0 commit comments

Comments
 (0)