[llvm-commits] [llvm] r135919 - in /llvm/trunk/tools/llvmc: CMakeLists.txt examples/CMakeLists.txt examples/Hello/CMakeLists.txt examples/Simple/CMakeLists.txt examples/Skeleton/CMakeLists.txt examples/mcc16/CMakeLists.txt src/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Mon Jul 25 10:25:10 PDT 2011
Author: ofv
Date: Mon Jul 25 12:25:10 2011
New Revision: 135919
URL: http://llvm.org/viewvc/llvm-project?rev=135919&view=rev
Log:
Builds llvmc and its examples with CMake.
Patch by arrowdodger!
Added:
llvm/trunk/tools/llvmc/examples/CMakeLists.txt
llvm/trunk/tools/llvmc/examples/Hello/CMakeLists.txt
llvm/trunk/tools/llvmc/examples/Simple/CMakeLists.txt
llvm/trunk/tools/llvmc/examples/Skeleton/CMakeLists.txt
llvm/trunk/tools/llvmc/examples/mcc16/CMakeLists.txt
llvm/trunk/tools/llvmc/src/CMakeLists.txt
Modified:
llvm/trunk/tools/llvmc/CMakeLists.txt
Modified: llvm/trunk/tools/llvmc/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/CMakeLists.txt?rev=135919&r1=135918&r2=135919&view=diff
==============================================================================
--- llvm/trunk/tools/llvmc/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvmc/CMakeLists.txt Mon Jul 25 12:25:10 2011
@@ -1,4 +1,8 @@
-# add_subdirectory(src)
+add_subdirectory(src)
# TODO: support plugins and user-configured builds.
# See ./doc/LLVMC-Reference.rst "Customizing LLVMC: the compilation graph"
+
+if( LLVM_INCLUDE_EXAMPLES )
+ add_subdirectory(examples)
+endif()
Added: llvm/trunk/tools/llvmc/examples/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/examples/CMakeLists.txt?rev=135919&view=auto
==============================================================================
--- llvm/trunk/tools/llvmc/examples/CMakeLists.txt (added)
+++ llvm/trunk/tools/llvmc/examples/CMakeLists.txt Mon Jul 25 12:25:10 2011
@@ -0,0 +1,4 @@
+add_subdirectory(Hello)
+add_subdirectory(Simple)
+add_subdirectory(mcc16)
+add_subdirectory(Skeleton)
Added: llvm/trunk/tools/llvmc/examples/Hello/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/examples/Hello/CMakeLists.txt?rev=135919&view=auto
==============================================================================
--- llvm/trunk/tools/llvmc/examples/Hello/CMakeLists.txt (added)
+++ llvm/trunk/tools/llvmc/examples/Hello/CMakeLists.txt Mon Jul 25 12:25:10 2011
@@ -0,0 +1,4 @@
+set(LLVM_USED_LIBS CompilerDriver)
+set(LLVM_LINK_COMPONENTS support)
+
+add_llvm_example(Hello Hello.cpp)
Added: llvm/trunk/tools/llvmc/examples/Simple/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/examples/Simple/CMakeLists.txt?rev=135919&view=auto
==============================================================================
--- llvm/trunk/tools/llvmc/examples/Simple/CMakeLists.txt (added)
+++ llvm/trunk/tools/llvmc/examples/Simple/CMakeLists.txt Mon Jul 25 12:25:10 2011
@@ -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
+ )
Added: llvm/trunk/tools/llvmc/examples/Skeleton/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/examples/Skeleton/CMakeLists.txt?rev=135919&view=auto
==============================================================================
--- llvm/trunk/tools/llvmc/examples/Skeleton/CMakeLists.txt (added)
+++ llvm/trunk/tools/llvmc/examples/Skeleton/CMakeLists.txt Mon Jul 25 12:25:10 2011
@@ -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
+ )
Added: llvm/trunk/tools/llvmc/examples/mcc16/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/examples/mcc16/CMakeLists.txt?rev=135919&view=auto
==============================================================================
--- llvm/trunk/tools/llvmc/examples/mcc16/CMakeLists.txt (added)
+++ llvm/trunk/tools/llvmc/examples/mcc16/CMakeLists.txt Mon Jul 25 12:25:10 2011
@@ -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
+ )
Added: llvm/trunk/tools/llvmc/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/src/CMakeLists.txt?rev=135919&view=auto
==============================================================================
--- llvm/trunk/tools/llvmc/src/CMakeLists.txt (added)
+++ llvm/trunk/tools/llvmc/src/CMakeLists.txt Mon Jul 25 12:25:10 2011
@@ -0,0 +1,19 @@
+set(LLVMGCCCOMMAND llvm-gcc)
+set(LLVMGXXCOMMAND llvm-g++)
+
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Base.td.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Base.td
+ @ONLY)
+
+set(LLVM_TARGET_DEFINITIONS AutoGenerated.td)
+
+tablegen(AutoGenerated.inc -gen-llvmc)
+
+set(LLVM_USED_LIBS CompilerDriver)
+set(LLVM_LINK_COMPONENTS support)
+
+add_llvm_tool(llvmc
+ Hooks.cpp
+ Main.cpp
+ )
More information about the llvm-commits
mailing list