llvm.org GIT mirror llvm / 0ef3b61
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 Oscar Fuentes 10 years ago
1 changed file(s) with 2 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
0
11 if( ${LLVM_TABLEGEN} STREQUAL "tblgen" )
2 set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native")
23 set(LLVM_TABLEGEN "${CX_NATIVE_TG_DIR}/bin/tblgen")
34
4 message(STATUS "CX_NATIVE_TG_DIR : ${CX_NATIVE_TG_DIR}")
55 add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}
66 COMMAND ${CMAKE_COMMAND} -E make_directory ${CX_NATIVE_TG_DIR}
77 COMMENT "Creating ${CX_NATIVE_TG_DIR}...")
2121
2222 add_dependencies(tblgen NativeTableGen)
2323
24 # TODO: We should clean the native build when the `clean target
25 # is invoked. This doesn't work.
26 # add_custom_command(TARGET clean
27 # COMMAND ${CMAKE_BUILD_TOOL} -C ${CX_NATIVE_TG_DIR}/utils/TableGen clean
28 # POST_BUILD
29 # COMMENT "Cleaning native TableGen...")
24 set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CX_NATIVE_TG_DIR})
3025 endif()