summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake/Modules
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-12-09 09:31:01 +0000
committerEric Fiselier <eric@efcs.ca>2016-12-09 09:31:01 +0000
commit0ef3b1b10a8cd66a0a8e8b9ef6eb50948ce51601 (patch)
tree32e86853ef9145d116b614e1c51aa6aa910bbb48 /libcxx/cmake/Modules
parentf51e05ffbc28d184db78574f8477338093f358f8 (diff)
downloadbcm5719-llvm-0ef3b1b10a8cd66a0a8e8b9ef6eb50948ce51601.tar.gz
bcm5719-llvm-0ef3b1b10a8cd66a0a8e8b9ef6eb50948ce51601.zip
Put C++ ABI headers in a special build directory instead of the top level.
This patch changes where the C++ ABI headers are put during the build. Previously they were put in the top level include directory (not the libc++ header directory). However that just polutes the top level directory. Instead this patch creates a special directory to put them in. The reason they can't be put under c++/v1 until after the build is because libc++ uses the in-source headers, so we can't add the include path of the libc++ headers in the object dir. Additionally this patch teaches the test suite how to find the ABI headers, and adds a demangling utility to help debug tests with. llvm-svn: 289195
Diffstat (limited to 'libcxx/cmake/Modules')
-rw-r--r--libcxx/cmake/Modules/HandleLibCXXABI.cmake14
1 files changed, 8 insertions, 6 deletions
diff --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
index f37c3bc9fce..39f2aa575b4 100644
--- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake
+++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
@@ -28,9 +28,11 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
set(LIBCXX_CXX_ABI_LIBRARY ${abilib})
set(LIBCXX_ABILIB_FILES ${abifiles})
- file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include")
+ # The place in the build tree where we store out-of-source headers.
+ set(LIBCXX_BUILD_HEADERS_ROOT "${CMAKE_BINARY_DIR}/include/c++-build")
+ file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}")
foreach(_d ${abidirs})
- file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/${_d}")
+ file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}/${_d}")
endforeach()
foreach(fpath ${LIBCXX_ABILIB_FILES})
@@ -41,16 +43,16 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
get_filename_component(dstdir ${fpath} PATH)
get_filename_component(ifile ${fpath} NAME)
file(COPY "${incpath}/${fpath}"
- DESTINATION "${CMAKE_BINARY_DIR}/include/${dstdir}"
+ DESTINATION "${LIBCXX_BUILD_HEADERS_ROOT}/${dstdir}"
)
if (LIBCXX_INSTALL_HEADERS)
- install(FILES "${CMAKE_BINARY_DIR}/include/${fpath}"
+ install(FILES "${LIBCXX_BUILD_HEADERS_ROOT}/${fpath}"
DESTINATION include/c++/v1/${dstdir}
COMPONENT libcxx
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
endif()
- list(APPEND abilib_headers "${CMAKE_BINARY_DIR}/include/${fpath}")
+ list(APPEND abilib_headers "${LIBCXX_BUILD_HEADERS_ROOT}/${fpath}")
endif()
endforeach()
if (NOT found)
@@ -58,7 +60,7 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
endif()
endforeach()
- include_directories("${CMAKE_BINARY_DIR}/include")
+ include_directories("${LIBCXX_BUILD_HEADERS_ROOT}")
endmacro()
OpenPOWER on IntegriCloud