Add Kaleidoscope regression tests.
[oota-llvm.git] / test / CMakeLists.txt
index 1f417c2a0fc6715489dc4e452b31c909f0bed1ae..464a6f0161a97a4f9622b045a8a6728a230c2896 100644 (file)
@@ -1,3 +1,7 @@
+if(LLVM_BUILD_EXAMPLES)
+  set(ENABLE_EXAMPLES 1)
+endif()
+
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
@@ -96,6 +100,16 @@ if(TARGET ocaml_llvm)
         )
 endif()
 
+if(LLVM_BUILD_EXAMPLES)
+  list(APPEND LLVM_TEST_DEPENDS
+    Kaleidoscope-Ch3
+    Kaleidoscope-Ch4
+    Kaleidoscope-Ch5
+    Kaleidoscope-Ch6
+    Kaleidoscope-Ch7
+    )
+endif()
+
 add_lit_testsuite(check-llvm "Running the LLVM regression tests"
   ${CMAKE_CURRENT_BINARY_DIR}
   PARAMS llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg