diff options
author | Petr Hosek <phosek@chromium.org> | 2018-07-25 22:57:39 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2018-07-25 22:57:39 +0000 |
commit | 162ce3fef4d3ae05416f9b6a9ff4dbdf89b9a822 (patch) | |
tree | 978d09b70e06e5e427e7c799c7356e9e419e210d | |
parent | 98e53227ebe340be25d33012008b18b5b6a80a0a (diff) |
[CMake] Don't install c++abi headers in standalone libc++ build
This is a refinement on r337833. Previously we were installing two
copies of c++abi headers in libc++ build directory, one in
include/c++build and another one in include/c++/v1. However, the
second copy is unnecessary when building libc++ standalone.
Differential Revision: https://reviews.llvm.org/D49752
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337979 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | cmake/Modules/HandleLibCXXABI.cmake | 2 | ||||
-rw-r--r-- | include/CMakeLists.txt | 2 |
3 files changed, 2 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 29357b088..1dd8725c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -407,7 +407,6 @@ elseif(LLVM_LIBRARY_OUTPUT_INTDIR) set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR}) else() set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}) - set(LIBCXX_HEADER_DIR ${CMAKE_BINARY_DIR}) endif() file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}") diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake index 54b1e1286..ef3b4f5dd 100644 --- a/cmake/Modules/HandleLibCXXABI.cmake +++ b/cmake/Modules/HandleLibCXXABI.cmake @@ -48,7 +48,7 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs) COMMENT "Copying C++ ABI header ${fpath}...") list(APPEND abilib_headers "${dst}") - if (NOT LIBCXX_USING_INSTALLED_LLVM) + if (NOT LIBCXX_USING_INSTALLED_LLVM AND LIBCXX_HEADER_DIR) set(dst "${LIBCXX_HEADER_DIR}/include/c++/v1/${dstdir}/${fpath}") add_custom_command(OUTPUT ${dst} DEPENDS ${src} diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index c60e61e6d..f4f894154 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -205,7 +205,7 @@ else() ) endif() -if(NOT LIBCXX_USING_INSTALLED_LLVM AND LLVM_BINARY_DIR) +if(NOT LIBCXX_USING_INSTALLED_LLVM AND LIBCXX_HEADER_DIR) set(output_dir ${LIBCXX_HEADER_DIR}/include/c++/v1) set(out_files) |