2013-11-16 02:34:43 +08:00
|
|
|
if (NOT LIBCXX_INSTALL_SUPPORT_HEADERS)
|
|
|
|
set(LIBCXX_SUPPORT_HEADER_PATTERN PATTERN "support" EXCLUDE)
|
|
|
|
endif()
|
[libcxx] Capture configuration information when installing the libc++ headers
Summary:
Hi all,
This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread.
Please read the design documentation added in this patch for a description of how it works.
Reviewers: mclow.lists, danalbert, jroelofs, EricWF
Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits
Differential Revision: http://reviews.llvm.org/D13407
llvm-svn: 250235
2015-10-14 06:12:02 +08:00
|
|
|
|
2014-10-24 00:51:12 +08:00
|
|
|
set(LIBCXX_HEADER_PATTERN
|
2013-11-16 02:34:43 +08:00
|
|
|
PATTERN "*"
|
|
|
|
PATTERN "CMakeLists.txt" EXCLUDE
|
|
|
|
PATTERN ".svn" EXCLUDE
|
[libcxx] Capture configuration information when installing the libc++ headers
Summary:
Hi all,
This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread.
Please read the design documentation added in this patch for a description of how it works.
Reviewers: mclow.lists, danalbert, jroelofs, EricWF
Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits
Differential Revision: http://reviews.llvm.org/D13407
llvm-svn: 250235
2015-10-14 06:12:02 +08:00
|
|
|
PATTERN "__config_site.in" EXCLUDE
|
2013-11-16 02:34:43 +08:00
|
|
|
${LIBCXX_SUPPORT_HEADER_PATTERN}
|
2014-10-24 00:51:12 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
file(COPY .
|
|
|
|
DESTINATION "${CMAKE_BINARY_DIR}/include/c++/v1"
|
|
|
|
FILES_MATCHING
|
|
|
|
${LIBCXX_HEADER_PATTERN}
|
|
|
|
)
|
|
|
|
|
2014-12-13 06:52:58 +08:00
|
|
|
if (LIBCXX_INSTALL_HEADERS)
|
|
|
|
install(DIRECTORY .
|
|
|
|
DESTINATION include/c++/v1
|
2015-08-20 01:41:53 +08:00
|
|
|
COMPONENT libcxx
|
2014-12-13 06:52:58 +08:00
|
|
|
FILES_MATCHING
|
|
|
|
${LIBCXX_HEADER_PATTERN}
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
2013-11-16 02:34:43 +08:00
|
|
|
)
|
[libcxx] Capture configuration information when installing the libc++ headers
Summary:
Hi all,
This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread.
Please read the design documentation added in this patch for a description of how it works.
Reviewers: mclow.lists, danalbert, jroelofs, EricWF
Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits
Differential Revision: http://reviews.llvm.org/D13407
llvm-svn: 250235
2015-10-14 06:12:02 +08:00
|
|
|
|
|
|
|
if (LIBCXX_NEEDS_SITE_CONFIG)
|
|
|
|
set(UNIX_CAT cat)
|
|
|
|
if (WIN32)
|
|
|
|
set(UNIX_CAT type)
|
|
|
|
endif()
|
|
|
|
# Generate and install a custom __config header. The new header is created
|
|
|
|
# by prepending __config_site to the current __config header.
|
|
|
|
add_custom_command(OUTPUT ${LIBCXX_BINARY_DIR}/__generated_config
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBCXX_BINARY_DIR}/__config_site ${LIBCXX_BINARY_DIR}/__generated_config
|
|
|
|
COMMAND ${UNIX_CAT} ${LIBCXX_SOURCE_DIR}/include/__config >> ${LIBCXX_BINARY_DIR}/__generated_config
|
|
|
|
DEPENDS ${LIBCXX_SOURCE_DIR}/include/__config
|
|
|
|
${LIBCXX_BINARY_DIR}/__config_site
|
|
|
|
)
|
|
|
|
# Add a target that executes the generation commands.
|
|
|
|
add_custom_target(generate_config_header ALL
|
|
|
|
DEPENDS ${LIBCXX_BINARY_DIR}/__generated_config)
|
|
|
|
# Install the generated header as __config.
|
|
|
|
install(FILES ${LIBCXX_BINARY_DIR}/__generated_config
|
|
|
|
DESTINATION include/c++/v1
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
|
|
RENAME __config
|
|
|
|
COMPONENT libcxx)
|
|
|
|
endif()
|
|
|
|
|
2014-12-13 06:52:58 +08:00
|
|
|
endif()
|