aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvmc/examples
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-07-25 17:25:10 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-07-25 17:25:10 +0000
commit5fe5203c23959658907c4b6388de6b14a2aba902 (patch)
tree658db01bd753990e5f8e4846391128a6c44aa364 /tools/llvmc/examples
parent796f925175eda4e0b208e1206accba2281efa39f (diff)
downloadexternal_llvm-5fe5203c23959658907c4b6388de6b14a2aba902.zip
external_llvm-5fe5203c23959658907c4b6388de6b14a2aba902.tar.gz
external_llvm-5fe5203c23959658907c4b6388de6b14a2aba902.tar.bz2
Builds llvmc and its examples with CMake.
Patch by arrowdodger! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc/examples')
-rw-r--r--tools/llvmc/examples/CMakeLists.txt4
-rw-r--r--tools/llvmc/examples/Hello/CMakeLists.txt4
-rw-r--r--tools/llvmc/examples/Simple/CMakeLists.txt10
-rw-r--r--tools/llvmc/examples/Skeleton/CMakeLists.txt11
-rw-r--r--tools/llvmc/examples/mcc16/CMakeLists.txt11
5 files changed, 40 insertions, 0 deletions
diff --git a/tools/llvmc/examples/CMakeLists.txt b/tools/llvmc/examples/CMakeLists.txt
new file mode 100644
index 0000000..2ad8aa4
--- /dev/null
+++ b/tools/llvmc/examples/CMakeLists.txt
@@ -0,0 +1,4 @@
+add_subdirectory(Hello)
+add_subdirectory(Simple)
+add_subdirectory(mcc16)
+add_subdirectory(Skeleton)
diff --git a/tools/llvmc/examples/Hello/CMakeLists.txt b/tools/llvmc/examples/Hello/CMakeLists.txt
new file mode 100644
index 0000000..5679924
--- /dev/null
+++ b/tools/llvmc/examples/Hello/CMakeLists.txt
@@ -0,0 +1,4 @@
+set(LLVM_USED_LIBS CompilerDriver)
+set(LLVM_LINK_COMPONENTS support)
+
+add_llvm_example(Hello Hello.cpp)
diff --git a/tools/llvmc/examples/Simple/CMakeLists.txt b/tools/llvmc/examples/Simple/CMakeLists.txt
new file mode 100644
index 0000000..8a401ea
--- /dev/null
+++ b/tools/llvmc/examples/Simple/CMakeLists.txt
@@ -0,0 +1,10 @@
+set(LLVM_TARGET_DEFINITIONS Simple.td)
+
+tablegen(Simple.inc -gen-llvmc)
+
+set(LLVM_USED_LIBS CompilerDriver)
+set(LLVM_LINK_COMPONENTS support)
+
+add_llvm_example(Simple
+ Simple.cpp
+ )
diff --git a/tools/llvmc/examples/Skeleton/CMakeLists.txt b/tools/llvmc/examples/Skeleton/CMakeLists.txt
new file mode 100644
index 0000000..e1296ca
--- /dev/null
+++ b/tools/llvmc/examples/Skeleton/CMakeLists.txt
@@ -0,0 +1,11 @@
+set(LLVM_TARGET_DEFINITIONS AutoGenerated.td)
+
+tablegen(AutoGenerated.inc -gen-llvmc)
+
+set(LLVM_USED_LIBS CompilerDriver)
+set(LLVM_LINK_COMPONENTS support)
+
+add_llvm_example(llvmc-skeleton
+ Hooks.cpp
+ Main.cpp
+ )
diff --git a/tools/llvmc/examples/mcc16/CMakeLists.txt b/tools/llvmc/examples/mcc16/CMakeLists.txt
new file mode 100644
index 0000000..f9eeb03
--- /dev/null
+++ b/tools/llvmc/examples/mcc16/CMakeLists.txt
@@ -0,0 +1,11 @@
+set(LLVM_TARGET_DEFINITIONS PIC16.td)
+
+tablegen(PIC16.inc -gen-llvmc)
+
+set(LLVM_USED_LIBS CompilerDriver)
+set(LLVM_LINK_COMPONENTS support)
+
+add_llvm_example(mcc16
+ Hooks.cpp
+ Main.cpp
+ )