From: NAKAMURA Takumi Date: Sun, 19 Jan 2014 13:00:01 +0000 (+0000) Subject: [CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc63dd2eb33dbfa50aaa9089a681235249273757;p=clang [CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR. LLVM_*_OUTPUT_INTDIR should be available everywhere. It was my mistake when I introduced INTDIR stuff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199597 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a93b475b5b..3851f6a6a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,9 +178,6 @@ set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) -set(CLANG_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) -set(CLANG_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib) - if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE ) message(FATAL_ERROR "In-source builds are not allowed. CMake would overwrite " "the makefiles distributed with LLVM. Please create a directory and run cmake " @@ -310,7 +307,7 @@ macro(add_clang_library name) endif() add_library( ${name} ${libkind} ${srcs} ) add_dead_strip( ${name} ) - set_output_directory(${name} ${CLANG_RUNTIME_OUTPUT_INTDIR} ${CLANG_LIBRARY_OUTPUT_INTDIR}) + set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR}) if( LLVM_COMMON_DEPENDS ) add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} ) endif( LLVM_COMMON_DEPENDS ) @@ -340,7 +337,6 @@ endmacro(add_clang_library) macro(add_clang_executable name) add_llvm_executable( ${name} ${ARGN} ) set_target_properties(${name} PROPERTIES FOLDER "Clang executables") - set_output_directory(${name} ${CLANG_RUNTIME_OUTPUT_INTDIR} ${CLANG_LIBRARY_OUTPUT_INTDIR}) endmacro(add_clang_executable) include_directories(BEFORE diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt index 0bc1cd937f..425fc04be9 100644 --- a/lib/Headers/CMakeLists.txt +++ b/lib/Headers/CMakeLists.txt @@ -47,7 +47,7 @@ set(files module.map ) -set(output_dir ${CLANG_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include) +set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include) # Generate arm_neon.h clang_tablegen(arm_neon.h -gen-arm-neon diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5fe1e2f9a1..209154003a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -7,7 +7,7 @@ else () set(LLVM_BUILD_MODE "%(build_mode)s") endif () -string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${CLANG_RUNTIME_OUTPUT_INTDIR}) +string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt index 5d8deda313..e69a03031c 100644 --- a/tools/driver/CMakeLists.txt +++ b/tools/driver/CMakeLists.txt @@ -64,23 +64,23 @@ if(UNIX) set(clang_binary "clang${CMAKE_EXECUTABLE_SUFFIX}") else() set(CLANGXX_LINK_OR_COPY copy) - set(clang_binary "${CLANG_RUNTIME_OUTPUT_INTDIR}/clang${CMAKE_EXECUTABLE_SUFFIX}") + set(clang_binary "${LLVM_RUNTIME_OUTPUT_INTDIR}/clang${CMAKE_EXECUTABLE_SUFFIX}") endif() # Create the clang++ symlink in the build directory. -set(clang_pp "${CLANG_RUNTIME_OUTPUT_INTDIR}/clang++${CMAKE_EXECUTABLE_SUFFIX}") +set(clang_pp "${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++${CMAKE_EXECUTABLE_SUFFIX}") add_custom_command(TARGET clang POST_BUILD COMMAND ${CMAKE_COMMAND} -E ${CLANGXX_LINK_OR_COPY} "${clang_binary}" "${clang_pp}" - WORKING_DIRECTORY "${CLANG_RUNTIME_OUTPUT_INTDIR}") + WORKING_DIRECTORY "${LLVM_RUNTIME_OUTPUT_INTDIR}") set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${clang_pp}) # Create the clang-cl symlink in the build directory. -set(clang_cl "${CLANG_RUNTIME_OUTPUT_INTDIR}/clang-cl${CMAKE_EXECUTABLE_SUFFIX}") +set(clang_cl "${LLVM_RUNTIME_OUTPUT_INTDIR}/clang-cl${CMAKE_EXECUTABLE_SUFFIX}") add_custom_command(TARGET clang POST_BUILD COMMAND ${CMAKE_COMMAND} -E ${CLANGXX_LINK_OR_COPY} "${clang_binary}" "${clang_cl}" - WORKING_DIRECTORY "${CLANG_RUNTIME_OUTPUT_INTDIR}") + WORKING_DIRECTORY "${LLVM_RUNTIME_OUTPUT_INTDIR}") set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${clang_cl}) diff --git a/utils/TableGen/CMakeLists.txt b/utils/TableGen/CMakeLists.txt index 7fb9415e0c..29a1eedb7a 100644 --- a/utils/TableGen/CMakeLists.txt +++ b/utils/TableGen/CMakeLists.txt @@ -11,4 +11,3 @@ add_tablegen(clang-tblgen CLANG NeonEmitter.cpp TableGen.cpp ) -set_output_directory(clang-tblgen ${CLANG_RUNTIME_OUTPUT_INTDIR} ${CLANG_LIBRARY_OUTPUT_INTDIR})