diff options
author | Michal Gorny <mgorny@gentoo.org> | 2019-10-04 05:43:20 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2019-10-04 05:43:20 +0000 |
commit | 5caeb4a9b0ce48df77e6aa1c27f167de4ae6af82 (patch) | |
tree | 7275faecf5beab56154396a99312862caeab4925 | |
parent | cb46b69e3eeae23b99f646e6dd23b1f05f6d8671 (diff) | |
download | llvm-5caeb4a9b0ce48df77e6aa1c27f167de4ae6af82.zip llvm-5caeb4a9b0ce48df77e6aa1c27f167de4ae6af82.tar.gz llvm-5caeb4a9b0ce48df77e6aa1c27f167de4ae6af82.tar.bz2 |
[clang] [cmake] Add distribution install targets for remaining components
Add install targets as necessary to install bash-autocomplete,
scan-build and scan-view via LLVM_DISTRIBUTION_TARGETS.
Differential Revision: https://reviews.llvm.org/D68413
llvm-svn: 373695
-rw-r--r-- | clang/CMakeLists.txt | 10 | ||||
-rw-r--r-- | clang/tools/scan-build/CMakeLists.txt | 22 | ||||
-rw-r--r-- | clang/tools/scan-view/CMakeLists.txt | 14 | ||||
-rw-r--r-- | clang/utils/hmaptool/CMakeLists.txt | 9 |
4 files changed, 46 insertions, 9 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index 60937aa..aa21329 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -441,9 +441,15 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) COMPONENT clang-headers) endif() + add_custom_target(bash-autocomplete DEPENDS utils/bash-autocomplete.sh) install(PROGRAMS utils/bash-autocomplete.sh - DESTINATION share/clang - ) + DESTINATION share/clang + COMPONENT bash-autocomplete) + if(NOT LLVM_ENABLE_IDE) + add_llvm_install_targets(install-bash-autocomplete + DEPENDS bash-autocomplete + COMPONENT bash-autocomplete) + endif() endif() add_definitions( -D_GNU_SOURCE ) diff --git a/clang/tools/scan-build/CMakeLists.txt b/clang/tools/scan-build/CMakeLists.txt index 3803793..2824124 100644 --- a/clang/tools/scan-build/CMakeLists.txt +++ b/clang/tools/scan-build/CMakeLists.txt @@ -41,7 +41,9 @@ if(CLANG_INSTALL_SCANBUILD) ${CMAKE_BINARY_DIR}/bin/ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) - install(PROGRAMS bin/${BinFile} DESTINATION bin) + install(PROGRAMS bin/${BinFile} + DESTINATION bin + COMPONENT scan-build) endforeach() foreach(LibexecFile ${LibexecFiles}) @@ -53,7 +55,9 @@ if(CLANG_INSTALL_SCANBUILD) ${CMAKE_BINARY_DIR}/libexec/ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile}) list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile}) - install(PROGRAMS libexec/${LibexecFile} DESTINATION libexec) + install(PROGRAMS libexec/${LibexecFile} + DESTINATION libexec + COMPONENT scan-build) endforeach() foreach(ManPage ${ManPages}) @@ -65,7 +69,9 @@ if(CLANG_INSTALL_SCANBUILD) ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man/${ManPage}) list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage}) - install(PROGRAMS man/${ManPage} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) + install(PROGRAMS man/${ManPage} + DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 + COMPONENT scan-build) endforeach() foreach(ShareFile ${ShareFiles}) @@ -77,9 +83,17 @@ if(CLANG_INSTALL_SCANBUILD) ${CMAKE_BINARY_DIR}/share/scan-build/ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile}) list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile}) - install(FILES share/scan-build/${ShareFile} DESTINATION share/scan-build) + install(FILES share/scan-build/${ShareFile} + DESTINATION share/scan-build + COMPONENT scan-build) endforeach() add_custom_target(scan-build ALL DEPENDS ${Depends}) set_target_properties(scan-build PROPERTIES FOLDER "Misc") + + if(NOT LLVM_ENABLE_IDE) + add_llvm_install_targets("install-scan-build" + DEPENDS scan-build + COMPONENT scan-build) + endif() endif() diff --git a/clang/tools/scan-view/CMakeLists.txt b/clang/tools/scan-view/CMakeLists.txt index b305ca5..22edb97 100644 --- a/clang/tools/scan-view/CMakeLists.txt +++ b/clang/tools/scan-view/CMakeLists.txt @@ -21,7 +21,9 @@ if(CLANG_INSTALL_SCANVIEW) ${CMAKE_BINARY_DIR}/bin/ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) - install(PROGRAMS bin/${BinFile} DESTINATION bin) + install(PROGRAMS bin/${BinFile} + DESTINATION bin + COMPONENT scan-view) endforeach() foreach(ShareFile ${ShareFiles}) @@ -33,9 +35,17 @@ if(CLANG_INSTALL_SCANVIEW) ${CMAKE_BINARY_DIR}/share/scan-view/ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile}) list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile}) - install(FILES share/${ShareFile} DESTINATION share/scan-view) + install(FILES share/${ShareFile} + DESTINATION share/scan-view + COMPONENT scan-view) endforeach() add_custom_target(scan-view ALL DEPENDS ${Depends}) set_target_properties(scan-view PROPERTIES FOLDER "Misc") + + if(NOT LLVM_ENABLE_IDE) + add_llvm_install_targets("install-scan-view" + DEPENDS scan-view + COMPONENT scan-view) + endif() endif() diff --git a/clang/utils/hmaptool/CMakeLists.txt b/clang/utils/hmaptool/CMakeLists.txt index 5573009..62f2de0 100644 --- a/clang/utils/hmaptool/CMakeLists.txt +++ b/clang/utils/hmaptool/CMakeLists.txt @@ -9,8 +9,15 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${CLANG_HMAPTOOL}) list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL}) -install(PROGRAMS ${CLANG_HMAPTOOL} DESTINATION bin) +install(PROGRAMS ${CLANG_HMAPTOOL} + DESTINATION bin + COMPONENT hmaptool) add_custom_target(hmaptool ALL DEPENDS ${Depends}) set_target_properties(hmaptool PROPERTIES FOLDER "Utils") +if(NOT LLVM_ENABLE_IDE) + add_llvm_install_targets("install-hmaptool" + DEPENDS hmaptool + COMPONENT hmaptool) +endif() |