summaryrefslogtreecommitdiffstats
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
commit54c1dedd429e878bdbce357fa5c90f3d1f43886b (patch)
tree9371d65324b7b3d2226306bb37ca01e1cf7aa657
parentd3b33fea650c25c2e0fa58b2db2bf55a013bdd5b (diff)
downloadbcm5719-llvm-54c1dedd429e878bdbce357fa5c90f3d1f43886b.tar.gz
bcm5719-llvm-54c1dedd429e878bdbce357fa5c90f3d1f43886b.zip
CMake: Fixed cross-compiling.
`clean' makefile target removes add-hoc directory created for building the native tablegen. llvm-svn: 59005
-rw-r--r--llvm/cmake/modules/CrossCompileLLVM.cmake9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/cmake/modules/CrossCompileLLVM.cmake b/llvm/cmake/modules/CrossCompileLLVM.cmake
index 1c00f3958e6..f638d67a30d 100644
--- a/llvm/cmake/modules/CrossCompileLLVM.cmake
+++ b/llvm/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()
OpenPOWER on IntegriCloud