]> granicus.if.org Git - clang/commitdiff
[CMake] Introduce CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 16 Dec 2013 16:03:21 +0000 (16:03 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 16 Dec 2013 16:03:21 +0000 (16:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197395 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
lib/Headers/CMakeLists.txt
tools/driver/CMakeLists.txt

index 8d02bf05f827d5976f1083f0948438887d285074..8db8a9a0053d29fc3b220f530d60c6d7c363b3b9 100644 (file)
@@ -103,6 +103,9 @@ 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}/bin/${CMAKE_CFG_INTDIR})
+set(CLANG_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR})
+
 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 "
index 2da1a28aca42e677fb164b7337cfea5c0a60e329..9c27593988ec8246af1c6eba0886a03970535895 100644 (file)
@@ -47,7 +47,7 @@ set(files
   module.map
   )
 
-set(output_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/clang/${CLANG_VERSION}/include)
+set(output_dir ${CLANG_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
 
 # If we are in an IDE that has a configuration directory, we need to
 # create a second copy of the headers so that 'clang' can find them if
index 4a96d5f069f85b3c2fa95eb1244fc280663404f2..3526006bbbc8639b2efcc6b9c5cc6cb82f88219e 100644 (file)
@@ -61,11 +61,11 @@ if(UNIX)
   set(clang_binary "clang${CMAKE_EXECUTABLE_SUFFIX}")
 else()
   set(CLANGXX_LINK_OR_COPY copy)
-  set(clang_binary "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/clang${CMAKE_EXECUTABLE_SUFFIX}")
+  set(clang_binary "${CLANG_RUNTIME_OUTPUT_INTDIR}/clang${CMAKE_EXECUTABLE_SUFFIX}")
 endif()
 
 # Create the clang++ symlink in the build directory.
-set(clang_pp "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/clang++${CMAKE_EXECUTABLE_SUFFIX}")
+set(clang_pp "${CLANG_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}")
 
@@ -73,7 +73,7 @@ set_property(DIRECTORY APPEND
   PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${clang_pp})
 
 # Create the clang-cl symlink in the build directory.
-set(clang_cl "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/clang-cl${CMAKE_EXECUTABLE_SUFFIX}")
+set(clang_cl "${CLANG_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}")