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 | |
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
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 7 | ||||
-rw-r--r-- | lib/asan/CMakeLists.txt | 3 | ||||
-rw-r--r-- | lib/cfi/CMakeLists.txt | 3 | ||||
-rw-r--r-- | lib/msan/CMakeLists.txt | 3 |
4 files changed, 8 insertions, 8 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) diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt index 6716f48b2..3a29ba830 100644 --- a/lib/asan/CMakeLists.txt +++ b/lib/asan/CMakeLists.txt @@ -219,8 +219,7 @@ else() endforeach() endif() -add_compiler_rt_resource_file(asan_blacklist asan_blacklist.txt) -add_dependencies(asan asan_blacklist) +add_compiler_rt_resource_file(asan_blacklist asan_blacklist.txt asan) add_dependencies(compiler-rt asan) add_subdirectory(scripts) diff --git a/lib/cfi/CMakeLists.txt b/lib/cfi/CMakeLists.txt index ec428a25a..5e79528cf 100644 --- a/lib/cfi/CMakeLists.txt +++ b/lib/cfi/CMakeLists.txt @@ -34,6 +34,5 @@ foreach(arch ${CFI_SUPPORTED_ARCH}) PARENT_TARGET cfi) endforeach() -add_compiler_rt_resource_file(cfi_blacklist cfi_blacklist.txt) -add_dependencies(cfi cfi_blacklist) +add_compiler_rt_resource_file(cfi_blacklist cfi_blacklist.txt cfi) add_dependencies(compiler-rt cfi) diff --git a/lib/msan/CMakeLists.txt b/lib/msan/CMakeLists.txt index 1b48def46..fb75daeb9 100644 --- a/lib/msan/CMakeLists.txt +++ b/lib/msan/CMakeLists.txt @@ -58,8 +58,7 @@ foreach(arch ${MSAN_SUPPORTED_ARCH}) endif() endforeach() -add_compiler_rt_resource_file(msan_blacklist msan_blacklist.txt) -add_dependencies(msan msan_blacklist) +add_compiler_rt_resource_file(msan_blacklist msan_blacklist.txt msan) add_dependencies(compiler-rt msan) if(COMPILER_RT_INCLUDE_TESTS) |