From c64c9801404f3d8239f820960cab119d1f645c8d Mon Sep 17 00:00:00 2001 From: Michael Gottesman Date: Mon, 2 Sep 2013 07:28:05 +0000 Subject: [PATCH] [cmake] Provide an option to not install the support headers so that the cmake build can match the make build if requested. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189739 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 1 + lib/CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e56b06182..9723d2660 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,7 @@ option(LIBCXX_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) option(LIBCXX_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF) option(LIBCXX_ENABLE_CXX0X "Enable -std=c++0x and use of c++0x language features if the compiler supports it." ON) option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON) +option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ support headers." ON) set(CXXABIS none libcxxabi libcxxrt libsupc++) if (NOT DEFINED LIBCXX_CXX_ABI) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 45effccaf..9f28f68b9 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -100,9 +100,15 @@ install(TARGETS cxx ARCHIVE DESTINATION lib ) + +if (NOT LIBCXX_INSTALL_SUPPORT_HEADERS) + set(LIBCXX_SUPPORT_HEADER_PATTERN PATTERN "support" EXCLUDE) +endif() + install(DIRECTORY ../include/ DESTINATION include/c++/v1 FILES_MATCHING PATTERN "*" PATTERN ".svn" EXCLUDE + ${LIBCXX_SUPPORT_HEADER_PATTERN} )