Skip to content

Commit 177a0e5

Browse files
committed
Fix running MLIR tests when enabling examples but the native backends isn't configured (NFC)
1 parent 9b70a28 commit 177a0e5

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

mlir/examples/toy/Ch6/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# This chapter depends on JIT support enabled.
2+
if(NOT MLIR_ENABLE_EXECUTION_ENGINE)
3+
return()
4+
endif()
5+
6+
17
# For a better template to copy, see examples/standalone
28
include_directories(include)
39
add_subdirectory(include)

mlir/examples/toy/Ch7/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# This chapter depends on JIT support enabled.
2+
if(NOT MLIR_ENABLE_EXECUTION_ENGINE)
3+
return()
4+
endif()
5+
16
# For a better template to copy, see examples/standalone
27
include_directories(include)
38
add_subdirectory(include)

mlir/test/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,13 @@ if(LLVM_BUILD_EXAMPLES)
121121
toyc-ch3
122122
toyc-ch4
123123
toyc-ch5
124-
toyc-ch6
125-
toyc-ch7
126124
)
125+
if(MLIR_ENABLE_EXECUTION_ENGINE)
126+
list(APPEND MLIR_TEST_DEPENDS
127+
toyc-ch6
128+
toyc-ch7
129+
)
130+
endif()
127131
endif()
128132

129133
if(MLIR_ENABLE_SPIRV_CPU_RUNNER)

0 commit comments

Comments
 (0)