summaryrefslogtreecommitdiff
path: root/mlir/examples
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2023-01-24 20:32:20 -0800
committerMehdi Amini <joker.eph@gmail.com>2023-01-24 20:32:51 -0800
commit177a0e591662be8bd60ffbdff8f45f54428c2c1e (patch)
tree03f8eb53d215650bc994896b2c880c71bbff34e4 /mlir/examples
parent9b70a28e0d767f99bdc778356e81b4d072f59819 (diff)
downloadllvm-177a0e591662be8bd60ffbdff8f45f54428c2c1e.tar.gz
Fix running MLIR tests when enabling examples but the native backends isn't configured (NFC)
Diffstat (limited to 'mlir/examples')
-rw-r--r--mlir/examples/toy/Ch6/CMakeLists.txt6
-rw-r--r--mlir/examples/toy/Ch7/CMakeLists.txt5
2 files changed, 11 insertions, 0 deletions
diff --git a/mlir/examples/toy/Ch6/CMakeLists.txt b/mlir/examples/toy/Ch6/CMakeLists.txt
index 48094f56d651..13ab002ad686 100644
--- a/mlir/examples/toy/Ch6/CMakeLists.txt
+++ b/mlir/examples/toy/Ch6/CMakeLists.txt
@@ -1,3 +1,9 @@
+# This chapter depends on JIT support enabled.
+if(NOT MLIR_ENABLE_EXECUTION_ENGINE)
+ return()
+endif()
+
+
# For a better template to copy, see examples/standalone
include_directories(include)
add_subdirectory(include)
diff --git a/mlir/examples/toy/Ch7/CMakeLists.txt b/mlir/examples/toy/Ch7/CMakeLists.txt
index 8de18d37e3d8..8c4c3ee06b57 100644
--- a/mlir/examples/toy/Ch7/CMakeLists.txt
+++ b/mlir/examples/toy/Ch7/CMakeLists.txt
@@ -1,3 +1,8 @@
+# This chapter depends on JIT support enabled.
+if(NOT MLIR_ENABLE_EXECUTION_ENGINE)
+ return()
+endif()
+
# For a better template to copy, see examples/standalone
include_directories(include)
add_subdirectory(include)