[libcxx] r280108 - [CMake] Copy headers relative to LLVM_BINARY_DIR

Chris Bieneman via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 09:51:34 PDT 2016


Author: cbieneman
Date: Tue Aug 30 11:51:34 2016
New Revision: 280108

URL: http://llvm.org/viewvc/llvm-project?rev=280108&view=rev
Log:
[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

Modified:
    libcxx/trunk/include/CMakeLists.txt

Modified: libcxx/trunk/include/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/CMakeLists.txt?rev=280108&r1=280107&r2=280108&view=diff
==============================================================================
--- libcxx/trunk/include/CMakeLists.txt (original)
+++ libcxx/trunk/include/CMakeLists.txt Tue Aug 30 11:51:34 2016
@@ -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 .




More information about the cfe-commits mailing list