diff options
author | Chris Bieneman <beanz@apple.com> | 2016-02-23 21:50:39 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-02-23 21:50:39 +0000 |
commit | 772a58dbc4b6f54131a74f917354550d4460c04a (patch) | |
tree | d62660eb5019882c02427c8e76eaef22bbf80b89 /cmake/Modules | |
parent | 0f6bf7c5dd33135f79f9617ea5d12f57afab93be (diff) |
[CMake] Assign components and dependencies during add_compiler_rt_resource_file
This makes it so that component-based installations will include resource files (i.e. blacklists). My next patch will add support for component-based installations.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index b64a61805..bb65f58c9 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -242,7 +242,7 @@ macro(add_compiler_rt_test test_suite test_name) add_dependencies(${test_suite} ${test_name}) endmacro() -macro(add_compiler_rt_resource_file target_name file_name) +macro(add_compiler_rt_resource_file target_name file_name component) set(src_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_name}") set(dst_file "${COMPILER_RT_OUTPUT_DIR}/${file_name}") add_custom_command(OUTPUT ${dst_file} @@ -251,7 +251,10 @@ macro(add_compiler_rt_resource_file target_name file_name) COMMENT "Copying ${file_name}...") add_custom_target(${target_name} DEPENDS ${dst_file}) # Install in Clang resource directory. - install(FILES ${file_name} DESTINATION ${COMPILER_RT_INSTALL_PATH}) + install(FILES ${file_name} + DESTINATION ${COMPILER_RT_INSTALL_PATH} + COMPONENT ${component}) + add_dependencies(${component} ${target_name}) endmacro() macro(add_compiler_rt_script name) |