[CMake] Don't copy headers on fully standalone
authorChris Bieneman <beanz@apple.com>
Thu, 1 Sep 2016 18:46:53 +0000 (18:46 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 1 Sep 2016 18:46:53 +0000 (18:46 +0000)
commitbd715f84a49aaf35b3b90eb204462f1ddddbddac
tree98ceb005538e2fce652349e6d1de37bfee10634b
parentadd05a8d958a73874a0e7c48a1538837fc598e06
[CMake] Don't copy headers on fully standalone

In r280108 I tried to make the headers copy relative to LLVM_BINARY_DIR, and the intent was that it would only happen on in-tree builds or runtimes directory builds. It didn't actually work that way.

This patch adds a check for CMAKE_SOURCE_DIR being equal to CMAKE_CURRENT_SOURCE_DIR. In this case we set a variable LIBCXX_USING_INSTLLED_LLVM. This doesn't necessarily mean the LLVM is installed (it could be a build directory), but it means we need to treat the LLVM directory as read-only.

llvm-svn: 280400
libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake
libcxx/include/CMakeLists.txt