[PATCH] [CMake][VS][XCode] Restruct the output directory layout more comfortable, ${BINARY_DIR}/${BUILD_MODE}/(bin|lib)

NAKAMURA Takumi geek4civic at gmail.com
Sat Dec 21 06:50:43 PST 2013


  Brushed up for llvm-lit/CMakeLists.txt to use ${LLVM_RUNTIME_OUTPUT_INTDIR}.

http://llvm-reviews.chandlerc.com/D2453

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D2453?vs=6221&id=6224#toc

Files:
  llvm/utils/llvm-lit/CMakeLists.txt

Index: llvm/utils/llvm-lit/CMakeLists.txt
===================================================================
--- llvm/utils/llvm-lit/CMakeLists.txt
+++ llvm/utils/llvm-lit/CMakeLists.txt
@@ -2,18 +2,20 @@
   # llvm-lit needs suffix.py for multiprocess to find a main module.
   set(suffix .py)
 endif ()
+set(llvm_lit_path ${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lit${suffix})
 
 if (NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
   foreach (BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
+    string(REPLACE ${CMAKE_CFG_INTDIR} ${BUILD_MODE} bi ${llvm_lit_path})
     configure_file(
       llvm-lit.in
-      ${CMAKE_BINARY_DIR}/${BUILD_MODE}/bin/llvm-lit${suffix}
+      ${bi}
       )
   endforeach ()
 else()
   set(BUILD_MODE .)
   configure_file(
     llvm-lit.in
-    ${CMAKE_BINARY_DIR}/bin/llvm-lit${suffix}
+    ${llvm_lit_path}
     )
 endif ()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2453.2.patch
Type: text/x-patch
Size: 841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131221/aa04647a/attachment.bin>


More information about the cfe-commits mailing list