2018-04-09 12:36:04 +08:00
|
|
|
if (NOT LIBCXX_INSTALL_SUPPORT_HEADERS)
|
|
|
|
set(LIBCXX_SUPPORT_HEADER_PATTERN PATTERN "support" EXCLUDE)
|
2013-11-16 02:34:43 +08:00
|
|
|
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
|
|
|
|
2018-03-10 09:20:11 +08:00
|
|
|
if (LIBCXX_NEEDS_SITE_CONFIG)
|
|
|
|
# Generate 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 ${PYTHON_EXECUTABLE} ${LIBCXX_SOURCE_DIR}/utils/cat_files.py
|
|
|
|
${LIBCXX_BINARY_DIR}/__config_site
|
|
|
|
${LIBCXX_SOURCE_DIR}/include/__config
|
|
|
|
-o ${LIBCXX_BINARY_DIR}/__generated_config
|
|
|
|
DEPENDS ${LIBCXX_SOURCE_DIR}/include/__config
|
|
|
|
${LIBCXX_BINARY_DIR}/__config_site
|
|
|
|
)
|
|
|
|
# Add a target that executes the generation commands.
|
2018-04-09 12:36:04 +08:00
|
|
|
add_custom_target(generate_config_header ALL
|
2018-03-10 09:20:11 +08:00
|
|
|
DEPENDS ${LIBCXX_BINARY_DIR}/__generated_config)
|
2018-04-09 12:36:04 +08:00
|
|
|
set(generated_config_deps generate_config_header)
|
2018-03-10 09:20:11 +08:00
|
|
|
endif()
|
|
|
|
|
2018-04-09 12:36:04 +08:00
|
|
|
set(LIBCXX_HEADER_PATTERN
|
|
|
|
PATTERN "*"
|
|
|
|
PATTERN "CMakeLists.txt" EXCLUDE
|
|
|
|
PATTERN ".svn" EXCLUDE
|
|
|
|
PATTERN "__config_site.in" EXCLUDE
|
|
|
|
${LIBCXX_SUPPORT_HEADER_PATTERN}
|
|
|
|
)
|
2018-04-09 12:23:04 +08:00
|
|
|
|
2018-04-09 12:36:04 +08:00
|
|
|
if(NOT LIBCXX_USING_INSTALLED_LLVM AND LLVM_BINARY_DIR)
|
|
|
|
file(COPY .
|
|
|
|
DESTINATION "${LLVM_BINARY_DIR}/include/c++/v1"
|
|
|
|
FILES_MATCHING
|
|
|
|
${LIBCXX_HEADER_PATTERN}
|
|
|
|
)
|
2018-03-10 09:20:11 +08:00
|
|
|
|
|
|
|
if (LIBCXX_NEEDS_SITE_CONFIG)
|
|
|
|
# Copy the generated header as __config into build directory.
|
2018-04-09 12:36:04 +08:00
|
|
|
add_custom_command(
|
|
|
|
TARGET generate_config_header POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
${LIBCXX_BINARY_DIR}/__generated_config
|
|
|
|
${LLVM_BINARY_DIR}/include/c++/v1/__config)
|
2018-03-10 09:20:11 +08:00
|
|
|
endif()
|
2016-08-31 00:51:34 +08:00
|
|
|
endif()
|
2014-10-24 00:51:12 +08:00
|
|
|
|
2014-12-13 06:52:58 +08:00
|
|
|
if (LIBCXX_INSTALL_HEADERS)
|
2018-04-09 12:36:04 +08:00
|
|
|
install(DIRECTORY .
|
|
|
|
DESTINATION ${LIBCXX_INSTALL_PREFIX}include/c++/v1
|
|
|
|
COMPONENT cxx-headers
|
|
|
|
FILES_MATCHING
|
|
|
|
${LIBCXX_HEADER_PATTERN}
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
|
|
)
|
[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)
|
|
|
|
# Install the generated header as __config.
|
|
|
|
install(FILES ${LIBCXX_BINARY_DIR}/__generated_config
|
2017-07-11 10:39:50 +08:00
|
|
|
DESTINATION ${LIBCXX_INSTALL_PREFIX}include/c++/v1
|
[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
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
|
|
RENAME __config
|
2016-08-25 06:17:06 +08:00
|
|
|
COMPONENT cxx-headers)
|
2016-04-30 06:17:15 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT CMAKE_CONFIGURATION_TYPES)
|
2018-04-09 12:36:04 +08:00
|
|
|
# this target is just needed as a placeholder for the distribution target
|
|
|
|
add_custom_target(cxx-headers)
|
2016-08-25 06:17:06 +08:00
|
|
|
add_custom_target(install-cxx-headers
|
|
|
|
DEPENDS cxx-headers ${generated_config_deps}
|
2016-04-30 06:17:15 +08:00
|
|
|
COMMAND "${CMAKE_COMMAND}"
|
2016-08-25 06:17:06 +08:00
|
|
|
-DCMAKE_INSTALL_COMPONENT=cxx-headers
|
2016-04-30 06:17:15 +08:00
|
|
|
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
2017-12-07 05:03:42 +08:00
|
|
|
# Stripping is a no-op for headers
|
|
|
|
add_custom_target(install-cxx-headers-stripped DEPENDS install-cxx-headers)
|
2016-08-25 06:17:06 +08:00
|
|
|
|
2018-04-09 12:36:04 +08:00
|
|
|
add_custom_target(libcxx-headers)
|
2016-08-25 06:17:06 +08:00
|
|
|
add_custom_target(install-libcxx-headers DEPENDS install-cxx-headers)
|
2017-12-09 05:50:32 +08:00
|
|
|
add_custom_target(install-libcxx-headers-stripped DEPENDS install-cxx-headers-stripped)
|
[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
|
|
|
endif()
|
2014-12-13 06:52:58 +08:00
|
|
|
endif()
|