Prechádzať zdrojové kódy

[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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@280108 91177308-0d34-0410-b5e6-96231b3b80d8
Chris Bieneman 9 rokov pred
rodič
commit
f47e6af72a
1 zmenil súbory, kde vykonal 7 pridanie a 5 odobranie
  1. 7 5
      include/CMakeLists.txt

+ 7 - 5
include/CMakeLists.txt

@@ -10,11 +10,13 @@ set(LIBCXX_HEADER_PATTERN
   ${LIBCXX_SUPPORT_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)
 if (LIBCXX_INSTALL_HEADERS)
   install(DIRECTORY .
   install(DIRECTORY .