r373695 - [clang] [cmake] Add distribution install targets for remaining components

Michal Gorny via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 3 22:43:20 PDT 2019


Author: mgorny
Date: Thu Oct  3 22:43:20 2019
New Revision: 373695

URL: http://llvm.org/viewvc/llvm-project?rev=373695&view=rev
Log:
[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

Modified:
    cfe/trunk/CMakeLists.txt
    cfe/trunk/tools/scan-build/CMakeLists.txt
    cfe/trunk/tools/scan-view/CMakeLists.txt
    cfe/trunk/utils/hmaptool/CMakeLists.txt

Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=373695&r1=373694&r2=373695&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Thu Oct  3 22:43:20 2019
@@ -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 )

Modified: cfe/trunk/tools/scan-build/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/CMakeLists.txt?rev=373695&r1=373694&r2=373695&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/CMakeLists.txt (original)
+++ cfe/trunk/tools/scan-build/CMakeLists.txt Thu Oct  3 22:43:20 2019
@@ -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()

Modified: cfe/trunk/tools/scan-view/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-view/CMakeLists.txt?rev=373695&r1=373694&r2=373695&view=diff
==============================================================================
--- cfe/trunk/tools/scan-view/CMakeLists.txt (original)
+++ cfe/trunk/tools/scan-view/CMakeLists.txt Thu Oct  3 22:43:20 2019
@@ -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()

Modified: cfe/trunk/utils/hmaptool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/hmaptool/CMakeLists.txt?rev=373695&r1=373694&r2=373695&view=diff
==============================================================================
--- cfe/trunk/utils/hmaptool/CMakeLists.txt (original)
+++ cfe/trunk/utils/hmaptool/CMakeLists.txt Thu Oct  3 22:43:20 2019
@@ -9,8 +9,15 @@ add_custom_command(OUTPUT ${CMAKE_BINARY
                    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()




More information about the cfe-commits mailing list