[llvm] r225318 - cmake: Add Kaleidoscope target
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Jan 6 15:39:38 PST 2015
Author: dexonsmith
Date: Tue Jan 6 17:39:37 2015
New Revision: 225318
URL: http://llvm.org/viewvc/llvm-project?rev=225318&view=rev
Log:
cmake: Add Kaleidoscope target
Modified:
llvm/trunk/examples/Kaleidoscope/CMakeLists.txt
llvm/trunk/examples/Kaleidoscope/Chapter2/CMakeLists.txt
llvm/trunk/examples/Kaleidoscope/Chapter3/CMakeLists.txt
llvm/trunk/examples/Kaleidoscope/Chapter4/CMakeLists.txt
llvm/trunk/examples/Kaleidoscope/Chapter5/CMakeLists.txt
llvm/trunk/examples/Kaleidoscope/Chapter6/CMakeLists.txt
llvm/trunk/examples/Kaleidoscope/Chapter7/CMakeLists.txt
llvm/trunk/examples/Kaleidoscope/Chapter8/CMakeLists.txt
Modified: llvm/trunk/examples/Kaleidoscope/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/CMakeLists.txt?rev=225318&r1=225317&r2=225318&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/CMakeLists.txt Tue Jan 6 17:39:37 2015
@@ -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)
Modified: llvm/trunk/examples/Kaleidoscope/Chapter2/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter2/CMakeLists.txt?rev=225318&r1=225317&r2=225318&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter2/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter2/CMakeLists.txt Tue Jan 6 17:39:37 2015
@@ -1,3 +1,3 @@
-add_llvm_example(Kaleidoscope-Ch2
+add_kaleidoscope_chapter(Kaleidoscope-Ch2
toy.cpp
)
Modified: llvm/trunk/examples/Kaleidoscope/Chapter3/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter3/CMakeLists.txt?rev=225318&r1=225317&r2=225318&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter3/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter3/CMakeLists.txt Tue Jan 6 17:39:37 2015
@@ -3,6 +3,6 @@ set(LLVM_LINK_COMPONENTS
Support
)
-add_llvm_example(Kaleidoscope-Ch3
+add_kaleidoscope_chapter(Kaleidoscope-Ch3
toy.cpp
)
Modified: llvm/trunk/examples/Kaleidoscope/Chapter4/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter4/CMakeLists.txt?rev=225318&r1=225317&r2=225318&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter4/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter4/CMakeLists.txt Tue Jan 6 17:39:37 2015
@@ -10,6 +10,6 @@ set(LLVM_LINK_COMPONENTS
mcjit
)
-add_llvm_example(Kaleidoscope-Ch4
+add_kaleidoscope_chapter(Kaleidoscope-Ch4
toy.cpp
)
Modified: llvm/trunk/examples/Kaleidoscope/Chapter5/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter5/CMakeLists.txt?rev=225318&r1=225317&r2=225318&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter5/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter5/CMakeLists.txt Tue Jan 6 17:39:37 2015
@@ -10,6 +10,6 @@ set(LLVM_LINK_COMPONENTS
mcjit
)
-add_llvm_example(Kaleidoscope-Ch5
+add_kaleidoscope_chapter(Kaleidoscope-Ch5
toy.cpp
)
Modified: llvm/trunk/examples/Kaleidoscope/Chapter6/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter6/CMakeLists.txt?rev=225318&r1=225317&r2=225318&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter6/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter6/CMakeLists.txt Tue Jan 6 17:39:37 2015
@@ -10,6 +10,6 @@ set(LLVM_LINK_COMPONENTS
mcjit
)
-add_llvm_example(Kaleidoscope-Ch6
+add_kaleidoscope_chapter(Kaleidoscope-Ch6
toy.cpp
)
Modified: llvm/trunk/examples/Kaleidoscope/Chapter7/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter7/CMakeLists.txt?rev=225318&r1=225317&r2=225318&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter7/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter7/CMakeLists.txt Tue Jan 6 17:39:37 2015
@@ -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
)
Modified: llvm/trunk/examples/Kaleidoscope/Chapter8/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter8/CMakeLists.txt?rev=225318&r1=225317&r2=225318&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter8/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter8/CMakeLists.txt Tue Jan 6 17:39:37 2015
@@ -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
)
More information about the llvm-commits
mailing list