[PATCH] D26375: [libc++] Compare to libc++ source directory for out-of-source check
Shoaib Meenai via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 7 16:11:04 PST 2016
smeenai created this revision.
smeenai added reviewers: beanz, EricWF, mclow.lists.
smeenai added a subscriber: cfe-commits.
Herald added a subscriber: mgorny.
When ensuring an out-of-source build, compare to the libc++ source
directory instead of the top-level cmake source directory (which would
be the LLVM source directory for an in-tree build). For an in-tree
build, LLVM already ensures that the build directory is different from
the LLVM source directory, so the existing check is redundant, and the
new check ensures the build directory is different from the libc++
source directory. For an out-of-tree build, the existing and new checks
are identical.
https://reviews.llvm.org/D26375
Files:
cmake/Modules/MacroEnsureOutOfSourceBuild.cmake
Index: cmake/Modules/MacroEnsureOutOfSourceBuild.cmake
===================================================================
--- cmake/Modules/MacroEnsureOutOfSourceBuild.cmake
+++ cmake/Modules/MacroEnsureOutOfSourceBuild.cmake
@@ -2,7 +2,7 @@
macro( MACRO_ENSURE_OUT_OF_SOURCE_BUILD _errorMessage )
-string( COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" _insource )
+string( COMPARE EQUAL "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" _insource )
if( _insource )
message( SEND_ERROR "${_errorMessage}" )
message( FATAL_ERROR
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26375.77113.patch
Type: text/x-patch
Size: 553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161108/3fb2916f/attachment.bin>
More information about the cfe-commits
mailing list