summaryrefslogtreecommitdiff
path: root/include/CMakeLists.txt
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-10-23 16:51:12 +0000
committerJustin Bogner <mail@justinbogner.com>2014-10-23 16:51:12 +0000
commita0ab096796abf42d57a2211fb7b7c385d38d116b (patch)
tree11ce11de71ef37ecf843ab5887dca43cef1bfa72 /include/CMakeLists.txt
parent4d2413ca4bc8b67e3e5a68069e117e8b7a8ec27d (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@220489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r--include/CMakeLists.txt17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index bbf7ea42b..df2cd343d 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -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
)