[llvm-commits] [llvm] r73180 - in /llvm/trunk: CMakeLists.txt cmake/modules/CrossCompileLLVM.cmake cmake/modules/TableGen.cmake
Oscar Fuentes
ofv at wanadoo.es
Wed Jun 10 21:16:11 PDT 2009
Author: ofv
Date: Wed Jun 10 23:16:10 2009
New Revision: 73180
URL: http://llvm.org/viewvc/llvm-project?rev=73180&view=rev
Log:
CMake: Fixed parallel build problem related to native tblgen when
cross-compiling.
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/cmake/modules/CrossCompileLLVM.cmake
llvm/trunk/cmake/modules/TableGen.cmake
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=73180&r1=73179&r2=73180&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Wed Jun 10 23:16:10 2009
@@ -222,6 +222,8 @@
set(LLVM_TABLEGEN "tblgen" CACHE
STRING "Native TableGen executable. Saves building one when cross-compiling.")
+# Effective tblgen executable to be used:
+set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN})
add_subdirectory(utils/TableGen)
Modified: llvm/trunk/cmake/modules/CrossCompileLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CrossCompileLLVM.cmake?rev=73180&r1=73179&r2=73180&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/CrossCompileLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/CrossCompileLLVM.cmake Wed Jun 10 23:16:10 2009
@@ -1,7 +1,7 @@
if( ${LLVM_TABLEGEN} STREQUAL "tblgen" )
set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native")
- set(LLVM_TABLEGEN "${CX_NATIVE_TG_DIR}/bin/tblgen")
+ set(LLVM_TABLEGEN_EXE "${CX_NATIVE_TG_DIR}/bin/tblgen")
add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}
COMMAND ${CMAKE_COMMAND} -E make_directory ${CX_NATIVE_TG_DIR}
@@ -13,12 +13,12 @@
DEPENDS ${CX_NATIVE_TG_DIR}
COMMENT "Configuring native TableGen...")
- add_custom_command(OUTPUT ${LLVM_TABLEGEN}
+ add_custom_command(OUTPUT ${LLVM_TABLEGEN_EXE}
COMMAND ${CMAKE_BUILD_TOOL}
DEPENDS ${CX_NATIVE_TG_DIR}/CMakeCache.txt
WORKING_DIRECTORY ${CX_NATIVE_TG_DIR}/utils/TableGen
COMMENT "Building native TableGen...")
- add_custom_target(NativeTableGen DEPENDS ${LLVM_TABLEGEN})
+ add_custom_target(NativeTableGen DEPENDS ${LLVM_TABLEGEN_EXE})
add_dependencies(tblgen NativeTableGen)
Modified: llvm/trunk/cmake/modules/TableGen.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=73180&r1=73179&r2=73180&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/TableGen.cmake (original)
+++ llvm/trunk/cmake/modules/TableGen.cmake Wed Jun 10 23:16:10 2009
@@ -6,11 +6,11 @@
file(GLOB all_tds "*.td")
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
- COMMAND ${LLVM_TABLEGEN} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND ${LLVM_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}
-I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS}
-o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
- DEPENDS ${LLVM_TABLEGEN} ${all_tds}
+ DEPENDS tblgen ${all_tds}
COMMENT "Building ${ofn}.tmp..."
)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
More information about the llvm-commits
mailing list