aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2008-11-10 22:09:59 +0000
committerOscar Fuentes <ofv@wanadoo.es>2008-11-10 22:09:59 +0000
commitc25fee087a7a67044d29b368337d0a89e5d6e506 (patch)
tree7d75de0e22e97d8315c9f8bf9b616a124955e5fc /cmake
parent85a356fb98de45391fcff0926a3c6f035c3c9a54 (diff)
downloadexternal_llvm-c25fee087a7a67044d29b368337d0a89e5d6e506.zip
external_llvm-c25fee087a7a67044d29b368337d0a89e5d6e506.tar.gz
external_llvm-c25fee087a7a67044d29b368337d0a89e5d6e506.tar.bz2
CMake: Fixed cross-compiling.
`clean' makefile target removes add-hoc directory created for building the native tablegen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/CrossCompileLLVM.cmake9
1 files changed, 2 insertions, 7 deletions
diff --git a/cmake/modules/CrossCompileLLVM.cmake b/cmake/modules/CrossCompileLLVM.cmake
index 1c00f39..f638d67 100644
--- a/cmake/modules/CrossCompileLLVM.cmake
+++ b/cmake/modules/CrossCompileLLVM.cmake
@@ -1,8 +1,8 @@
if( ${LLVM_TABLEGEN} STREQUAL "tblgen" )
+ set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native")
set(LLVM_TABLEGEN "${CX_NATIVE_TG_DIR}/bin/tblgen")
- message(STATUS "CX_NATIVE_TG_DIR : ${CX_NATIVE_TG_DIR}")
add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}
COMMAND ${CMAKE_COMMAND} -E make_directory ${CX_NATIVE_TG_DIR}
COMMENT "Creating ${CX_NATIVE_TG_DIR}...")
@@ -22,10 +22,5 @@ if( ${LLVM_TABLEGEN} STREQUAL "tblgen" )
add_dependencies(tblgen NativeTableGen)
- # TODO: We should clean the native build when the `clean target
- # is invoked. This doesn't work.
- # add_custom_command(TARGET clean
- # COMMAND ${CMAKE_BUILD_TOOL} -C ${CX_NATIVE_TG_DIR}/utils/TableGen clean
- # POST_BUILD
- # COMMENT "Cleaning native TableGen...")
+ set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CX_NATIVE_TG_DIR})
endif()