diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2009-06-11 04:16:10 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2009-06-11 04:16:10 +0000 |
commit | 99b94892f5fd7463103dbfbd5ddf1dc833593951 (patch) | |
tree | 7d4088a37eaa21f0599b4e8b671ce24987d68b7d /cmake | |
parent | 89456cecb3bd3b85f3b909b6e43fbf1f457540ed (diff) |
CMake: Fixed parallel build problem related to native tblgen when
cross-compiling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/CrossCompileLLVM.cmake | 6 | ||||
-rw-r--r-- | cmake/modules/TableGen.cmake | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cmake/modules/CrossCompileLLVM.cmake b/cmake/modules/CrossCompileLLVM.cmake index f638d67a30..138ff0e9fe 100644 --- a/cmake/modules/CrossCompileLLVM.cmake +++ b/cmake/modules/CrossCompileLLVM.cmake @@ -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 @@ if( ${LLVM_TABLEGEN} STREQUAL "tblgen" ) 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)
diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake index adb22c726b..16c732b089 100644 --- a/cmake/modules/TableGen.cmake +++ b/cmake/modules/TableGen.cmake @@ -6,11 +6,11 @@ macro(tablegen ofn) 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} |