From 76422f3e08fc9cb19128760b8e7f0b87d23da0d9 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 3 Feb 2011 11:41:27 +0000 Subject: cmake/*: Add svn:eol-style=native and fix CRLF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124793 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/AddLLVMDefinitions.cmake | 27 +++++++++--------- cmake/modules/CrossCompileLLVM.cmake | 52 +++++++++++++++++----------------- 2 files changed, 39 insertions(+), 40 deletions(-) (limited to 'cmake') diff --git a/cmake/modules/AddLLVMDefinitions.cmake b/cmake/modules/AddLLVMDefinitions.cmake index 2787830..33ac973 100644 --- a/cmake/modules/AddLLVMDefinitions.cmake +++ b/cmake/modules/AddLLVMDefinitions.cmake @@ -1,14 +1,13 @@ -# There is no clear way of keeping track of compiler command-line -# options chosen via `add_definitions', so we need our own method for -# using it on tools/llvm-config/CMakeLists.txt. - -# Beware that there is no implementation of remove_llvm_definitions. - -macro(add_llvm_definitions) - # We don't want no semicolons on LLVM_DEFINITIONS: - foreach(arg ${ARGN}) - set(LLVM_DEFINITIONS "${LLVM_DEFINITIONS} ${arg}") - endforeach(arg) - add_definitions( ${ARGN} ) -endmacro(add_llvm_definitions) - +# There is no clear way of keeping track of compiler command-line +# options chosen via `add_definitions', so we need our own method for +# using it on tools/llvm-config/CMakeLists.txt. + +# Beware that there is no implementation of remove_llvm_definitions. + +macro(add_llvm_definitions) + # We don't want no semicolons on LLVM_DEFINITIONS: + foreach(arg ${ARGN}) + set(LLVM_DEFINITIONS "${LLVM_DEFINITIONS} ${arg}") + endforeach(arg) + add_definitions( ${ARGN} ) +endmacro(add_llvm_definitions) diff --git a/cmake/modules/CrossCompileLLVM.cmake b/cmake/modules/CrossCompileLLVM.cmake index 138ff0e..98e60a5 100644 --- a/cmake/modules/CrossCompileLLVM.cmake +++ b/cmake/modules/CrossCompileLLVM.cmake @@ -1,26 +1,26 @@ - -if( ${LLVM_TABLEGEN} STREQUAL "tblgen" ) - set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native") - 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} - COMMENT "Creating ${CX_NATIVE_TG_DIR}...") - - add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt - COMMAND ${CMAKE_COMMAND} -UMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR} - WORKING_DIRECTORY ${CX_NATIVE_TG_DIR} - DEPENDS ${CX_NATIVE_TG_DIR} - COMMENT "Configuring native 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_EXE}) - - add_dependencies(tblgen NativeTableGen) - - set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CX_NATIVE_TG_DIR}) -endif() + +if( ${LLVM_TABLEGEN} STREQUAL "tblgen" ) + set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native") + 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} + COMMENT "Creating ${CX_NATIVE_TG_DIR}...") + + add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt + COMMAND ${CMAKE_COMMAND} -UMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${CX_NATIVE_TG_DIR} + DEPENDS ${CX_NATIVE_TG_DIR} + COMMENT "Configuring native 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_EXE}) + + add_dependencies(tblgen NativeTableGen) + + set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CX_NATIVE_TG_DIR}) +endif() -- cgit v1.1