cmake: Add Kaleidoscope target
[oota-llvm.git] / examples / Kaleidoscope / CMakeLists.txt
index 25e5745626e3a1c9fd72b66cad1a2332d1c72ffa..53c724f1a2d25b880f8f816545eb2ae425367eba 100644 (file)
@@ -1,3 +1,10 @@
+add_custom_target(Kaleidoscope)
+
+macro(add_kaleidoscope_chapter name)
+  add_dependencies(Kaleidoscope ${name})
+  add_llvm_example(${name} ${ARGN})
+endmacro(add_kaleidoscope_chapter name)
+
 add_subdirectory(Chapter2)
 add_subdirectory(Chapter3)
 add_subdirectory(Chapter4)