Skip to content

Commit b422ecc

Browse files
committed
[cmake] Provide an option to not install the support headers so that the cmake build can match the make build if requested.
llvm-svn: 189739
1 parent 05c4b55 commit b422ecc

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libcxx/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ option(LIBCXX_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
3838
option(LIBCXX_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
3939
option(LIBCXX_ENABLE_CXX0X "Enable -std=c++0x and use of c++0x language features if the compiler supports it." ON)
4040
option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON)
41+
option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ support headers." ON)
4142

4243
set(CXXABIS none libcxxabi libcxxrt libsupc++)
4344
if (NOT DEFINED LIBCXX_CXX_ABI)

libcxx/lib/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,15 @@ install(TARGETS cxx
100100
ARCHIVE DESTINATION lib
101101
)
102102

103+
104+
if (NOT LIBCXX_INSTALL_SUPPORT_HEADERS)
105+
set(LIBCXX_SUPPORT_HEADER_PATTERN PATTERN "support" EXCLUDE)
106+
endif()
107+
103108
install(DIRECTORY ../include/
104109
DESTINATION include/c++/v1
105110
FILES_MATCHING
106111
PATTERN "*"
107112
PATTERN ".svn" EXCLUDE
113+
${LIBCXX_SUPPORT_HEADER_PATTERN}
108114
)

0 commit comments

Comments
 (0)