[llvm-commits] [llvm] r59005 - /llvm/trunk/cmake/modules/CrossCompileLLVM.cmake

Oscar Fuentes ofv at wanadoo.es
Mon Nov 10 14:09:59 PST 2008


Author: ofv
Date: Mon Nov 10 16:09:59 2008
New Revision: 59005

URL: http://llvm.org/viewvc/llvm-project?rev=59005&view=rev
Log:
CMake: Fixed cross-compiling.

`clean' makefile target removes add-hoc directory created for building
the native tablegen.

Modified:
    llvm/trunk/cmake/modules/CrossCompileLLVM.cmake

Modified: llvm/trunk/cmake/modules/CrossCompileLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CrossCompileLLVM.cmake?rev=59005&r1=59004&r2=59005&view=diff

==============================================================================
--- llvm/trunk/cmake/modules/CrossCompileLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/CrossCompileLLVM.cmake Mon Nov 10 16:09:59 2008
@@ -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 @@
 
   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()





More information about the llvm-commits mailing list