[libcxx] r220489 - Make headers available in the build directory

Justin Bogner mail at justinbogner.com
Thu Oct 23 09:51:13 PDT 2014


Author: bogner
Date: Thu Oct 23 11:51:12 2014
New Revision: 220489

URL: http://llvm.org/viewvc/llvm-project?rev=220489&view=rev
Log:
Make headers available in the build directory

This essentially re-does r194825 and makes it possible to run clang
with libc++ without having to install it, even if you don't have any
version of libc++ installed in /usr/.

This behaviour broke in r210577/r211629, which fixed pr18681.

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=220489&r1=220488&r2=220489&view=diff
==============================================================================
--- libcxx/trunk/include/CMakeLists.txt (original)
+++ libcxx/trunk/include/CMakeLists.txt Thu Oct 23 11:51:12 2014
@@ -1,13 +1,22 @@
 if (NOT LIBCXX_INSTALL_SUPPORT_HEADERS)
   set(LIBCXX_SUPPORT_HEADER_PATTERN PATTERN "support" EXCLUDE)
 endif()
-
-install(DIRECTORY .
-  DESTINATION include/c++/v1
-  FILES_MATCHING
+set(LIBCXX_HEADER_PATTERN
   PATTERN "*"
   PATTERN "CMakeLists.txt" EXCLUDE
   PATTERN ".svn" EXCLUDE
   ${LIBCXX_SUPPORT_HEADER_PATTERN}
+  )
+
+file(COPY .
+  DESTINATION "${CMAKE_BINARY_DIR}/include/c++/v1"
+  FILES_MATCHING
+  ${LIBCXX_HEADER_PATTERN}
+  )
+
+install(DIRECTORY .
+  DESTINATION include/c++/v1
+  FILES_MATCHING
+  ${LIBCXX_HEADER_PATTERN}
   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
   )





More information about the cfe-commits mailing list