Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
174 changed files
with
128,532 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
if (NOT LIBCXX_INSTALL_SUPPORT_HEADERS) | ||
set(LIBCXX_SUPPORT_HEADER_PATTERN PATTERN "support" EXCLUDE) | ||
endif() | ||
|
||
set(LIBCXX_HEADER_PATTERN | ||
PATTERN "*" | ||
PATTERN "CMakeLists.txt" EXCLUDE | ||
PATTERN ".svn" EXCLUDE | ||
PATTERN "__config_site.in" EXCLUDE | ||
${LIBCXX_SUPPORT_HEADER_PATTERN} | ||
) | ||
|
||
file(COPY . | ||
DESTINATION "${CMAKE_BINARY_DIR}/include/c++/v1" | ||
FILES_MATCHING | ||
${LIBCXX_HEADER_PATTERN} | ||
) | ||
|
||
if (LIBCXX_INSTALL_HEADERS) | ||
install(DIRECTORY . | ||
DESTINATION include/c++/v1 | ||
COMPONENT libcxx | ||
FILES_MATCHING | ||
${LIBCXX_HEADER_PATTERN} | ||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | ||
) | ||
|
||
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() | ||
|
||
endif() |
Oops, something went wrong.