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
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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits