[PATCH] Select correct clang++ output directory when building with cmake as sub directory on Windows
Kenneth Benzie
k.benzie at codeplay.com
Mon Jan 6 04:57:35 PST 2014
Hi chandlerc,
When a root CMakeLists adds llvm as a sub directory on windows the post build step which copies clang++.exe fails due clang.exe not being found.
This is due to the CMAKE_BINARY_DIR variable pointing to the wrong directory, using LLVM_BINARY_DIR instead fixes this issue.
http://llvm-reviews.chandlerc.com/D2515
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -174,8 +174,8 @@
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)
+set(CLANG_RUNTIME_OUTPUT_INTDIR ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+set(CLANG_LIBRARY_OUTPUT_INTDIR ${LLVM_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 "
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2515.1.patch
Type: text/x-patch
Size: 713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140106/d8a7e996/attachment.bin>
More information about the cfe-commits
mailing list