summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-06 23:39:37 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-06 23:39:37 +0000
commit9e93701b57f3c7ff77f22c7d3e88c00a5fb6ff68 (patch)
tree231dc0b10dbf8dea7d43540c288ef0f44ae00200
parent3218c0fb943a05ffeeeefaffaa0f7f64b2bb3858 (diff)
downloadbcm5719-llvm-9e93701b57f3c7ff77f22c7d3e88c00a5fb6ff68.tar.gz
bcm5719-llvm-9e93701b57f3c7ff77f22c7d3e88c00a5fb6ff68.zip
cmake: Add Kaleidoscope target
llvm-svn: 225318
-rw-r--r--llvm/examples/Kaleidoscope/CMakeLists.txt7
-rw-r--r--llvm/examples/Kaleidoscope/Chapter2/CMakeLists.txt2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter3/CMakeLists.txt2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter4/CMakeLists.txt2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter7/CMakeLists.txt2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter8/CMakeLists.txt2
8 files changed, 14 insertions, 7 deletions
diff --git a/llvm/examples/Kaleidoscope/CMakeLists.txt b/llvm/examples/Kaleidoscope/CMakeLists.txt
index 25e5745626e..53c724f1a2d 100644
--- a/llvm/examples/Kaleidoscope/CMakeLists.txt
+++ b/llvm/examples/Kaleidoscope/CMakeLists.txt
@@ -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)
diff --git a/llvm/examples/Kaleidoscope/Chapter2/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter2/CMakeLists.txt
index 79f2b172d0d..fed3f4b78c7 100644
--- a/llvm/examples/Kaleidoscope/Chapter2/CMakeLists.txt
+++ b/llvm/examples/Kaleidoscope/Chapter2/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_example(Kaleidoscope-Ch2
+add_kaleidoscope_chapter(Kaleidoscope-Ch2
toy.cpp
)
diff --git a/llvm/examples/Kaleidoscope/Chapter3/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter3/CMakeLists.txt
index a98d7df1049..8053c968f3d 100644
--- a/llvm/examples/Kaleidoscope/Chapter3/CMakeLists.txt
+++ b/llvm/examples/Kaleidoscope/Chapter3/CMakeLists.txt
@@ -3,6 +3,6 @@ set(LLVM_LINK_COMPONENTS
Support
)
-add_llvm_example(Kaleidoscope-Ch3
+add_kaleidoscope_chapter(Kaleidoscope-Ch3
toy.cpp
)
diff --git a/llvm/examples/Kaleidoscope/Chapter4/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter4/CMakeLists.txt
index 86336debc87..45e92e4b8ca 100644
--- a/llvm/examples/Kaleidoscope/Chapter4/CMakeLists.txt
+++ b/llvm/examples/Kaleidoscope/Chapter4/CMakeLists.txt
@@ -10,6 +10,6 @@ set(LLVM_LINK_COMPONENTS
mcjit
)
-add_llvm_example(Kaleidoscope-Ch4
+add_kaleidoscope_chapter(Kaleidoscope-Ch4
toy.cpp
)
diff --git a/llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt
index e920f0e3445..5aac67485e1 100644
--- a/llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt
+++ b/llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt
@@ -10,6 +10,6 @@ set(LLVM_LINK_COMPONENTS
mcjit
)
-add_llvm_example(Kaleidoscope-Ch5
+add_kaleidoscope_chapter(Kaleidoscope-Ch5
toy.cpp
)
diff --git a/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt
index 9ffd86a65f9..c5a737ac67f 100644
--- a/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt
+++ b/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt
@@ -10,6 +10,6 @@ set(LLVM_LINK_COMPONENTS
mcjit
)
-add_llvm_example(Kaleidoscope-Ch6
+add_kaleidoscope_chapter(Kaleidoscope-Ch6
toy.cpp
)
diff --git a/llvm/examples/Kaleidoscope/Chapter7/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter7/CMakeLists.txt
index 12d745766cd..19fdb95d765 100644
--- a/llvm/examples/Kaleidoscope/Chapter7/CMakeLists.txt
+++ b/llvm/examples/Kaleidoscope/Chapter7/CMakeLists.txt
@@ -13,6 +13,6 @@ set(LLVM_LINK_COMPONENTS
set(LLVM_REQUIRES_RTTI 1)
-add_llvm_example(Kaleidoscope-Ch7
+add_kaleidoscope_chapter(Kaleidoscope-Ch7
toy.cpp
)
diff --git a/llvm/examples/Kaleidoscope/Chapter8/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter8/CMakeLists.txt
index 84436289d2c..1a957722399 100644
--- a/llvm/examples/Kaleidoscope/Chapter8/CMakeLists.txt
+++ b/llvm/examples/Kaleidoscope/Chapter8/CMakeLists.txt
@@ -13,6 +13,6 @@ set(LLVM_LINK_COMPONENTS
set(LLVM_REQUIRES_RTTI 1)
-add_llvm_example(Kaleidoscope-Ch8
+add_kaleidoscope_chapter(Kaleidoscope-Ch8
toy.cpp
)
OpenPOWER on IntegriCloud