From 0e4c73b24dfe5ba7406b1ab0cb20fbe89d50d264 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Tue, 30 Aug 2016 16:51:34 +0000 Subject: [PATCH] [CMake] Copy headers relative to LLVM_BINARY_DIR Summary: This copy phase is only needed for in-tree builds, so we should be copying to the LLVM build directory's include dir instead of the sub-project include dir. Reviewers: bogner, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24015 llvm-svn: 280108 --- libcxx/include/CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index 0542316..40ab262 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -10,11 +10,13 @@ set(LIBCXX_HEADER_PATTERN ${LIBCXX_SUPPORT_HEADER_PATTERN} ) -file(COPY . - DESTINATION "${CMAKE_BINARY_DIR}/include/c++/v1" - FILES_MATCHING - ${LIBCXX_HEADER_PATTERN} - ) +if(LLVM_BINARY_DIR) + file(COPY . + DESTINATION "${LLVM_BINARY_DIR}/include/c++/v1" + FILES_MATCHING + ${LIBCXX_HEADER_PATTERN} + ) +endif() if (LIBCXX_INSTALL_HEADERS) install(DIRECTORY . -- 2.7.4