[clang-tools-extra] r373694 - [clang-tools-extra] [cmake] Use add_clang_tool() to install tools

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


Author: mgorny
Date: Thu Oct  3 22:40:29 2019
New Revision: 373694

URL: http://llvm.org/viewvc/llvm-project?rev=373694&view=rev
Log:
[clang-tools-extra] [cmake] Use add_clang_tool() to install tools

Replace add_clang_executable() calls with add_clang_tool() that takes
care of creating correct, distribution-friendly install target.  While
at it, remove redundant install calls.

This change also causes clang-move and pp-trace to be installed.

Differential Revision: https://reviews.llvm.org/D68423

Modified:
    clang-tools-extra/trunk/clang-apply-replacements/tool/CMakeLists.txt
    clang-tools-extra/trunk/clang-change-namespace/tool/CMakeLists.txt
    clang-tools-extra/trunk/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt
    clang-tools-extra/trunk/clang-include-fixer/tool/CMakeLists.txt
    clang-tools-extra/trunk/clang-move/tool/CMakeLists.txt
    clang-tools-extra/trunk/clang-query/tool/CMakeLists.txt
    clang-tools-extra/trunk/pp-trace/CMakeLists.txt

Modified: clang-tools-extra/trunk/clang-apply-replacements/tool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-apply-replacements/tool/CMakeLists.txt?rev=373694&r1=373693&r2=373694&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-apply-replacements/tool/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clang-apply-replacements/tool/CMakeLists.txt Thu Oct  3 22:40:29 2019
@@ -14,6 +14,3 @@ target_link_libraries(clang-apply-replac
   clangToolingCore
   clangToolingRefactoring
   )
-
-install(TARGETS clang-apply-replacements
-  RUNTIME DESTINATION bin)

Modified: clang-tools-extra/trunk/clang-change-namespace/tool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-change-namespace/tool/CMakeLists.txt?rev=373694&r1=373693&r2=373694&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-change-namespace/tool/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clang-change-namespace/tool/CMakeLists.txt Thu Oct  3 22:40:29 2019
@@ -4,7 +4,7 @@ set(LLVM_LINK_COMPONENTS
   Support
   )
 
-add_clang_executable(clang-change-namespace
+add_clang_tool(clang-change-namespace
   ClangChangeNamespace.cpp
   )
 target_link_libraries(clang-change-namespace
@@ -20,6 +20,3 @@ target_link_libraries(clang-change-names
   clangTooling
   clangToolingCore
   )
-
-install(TARGETS clang-change-namespace
-  RUNTIME DESTINATION bin)

Modified: clang-tools-extra/trunk/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt?rev=373694&r1=373693&r2=373694&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt Thu Oct  3 22:40:29 2019
@@ -1,6 +1,6 @@
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
 
-add_clang_executable(find-all-symbols
+add_clang_tool(find-all-symbols
   FindAllSymbolsMain.cpp
   )
 
@@ -16,9 +16,6 @@ target_link_libraries(find-all-symbols
   findAllSymbols
   )
 
-install(TARGETS find-all-symbols
-  RUNTIME DESTINATION bin)
-
 install(PROGRAMS run-find-all-symbols.py
   DESTINATION share/clang
   COMPONENT find-all-symbols)

Modified: clang-tools-extra/trunk/clang-include-fixer/tool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-include-fixer/tool/CMakeLists.txt?rev=373694&r1=373693&r2=373694&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-include-fixer/tool/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clang-include-fixer/tool/CMakeLists.txt Thu Oct  3 22:40:29 2019
@@ -17,9 +17,6 @@ target_link_libraries(clang-include-fixe
   findAllSymbols
   )
 
-install(TARGETS clang-include-fixer
-  RUNTIME DESTINATION bin)
-
 install(PROGRAMS clang-include-fixer.el
   DESTINATION share/clang
   COMPONENT clang-include-fixer)

Modified: clang-tools-extra/trunk/clang-move/tool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-move/tool/CMakeLists.txt?rev=373694&r1=373693&r2=373694&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-move/tool/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clang-move/tool/CMakeLists.txt Thu Oct  3 22:40:29 2019
@@ -1,6 +1,6 @@
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
 
-add_clang_executable(clang-move
+add_clang_tool(clang-move
   ClangMove.cpp
   )
 

Modified: clang-tools-extra/trunk/clang-query/tool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-query/tool/CMakeLists.txt?rev=373694&r1=373693&r2=373694&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-query/tool/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clang-query/tool/CMakeLists.txt Thu Oct  3 22:40:29 2019
@@ -1,6 +1,6 @@
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
 
-add_clang_executable(clang-query
+add_clang_tool(clang-query
   ClangQuery.cpp
   )
 target_link_libraries(clang-query
@@ -14,5 +14,3 @@ target_link_libraries(clang-query
   clangSerialization
   clangTooling
   )
-
-install(TARGETS clang-query RUNTIME DESTINATION bin)

Modified: clang-tools-extra/trunk/pp-trace/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/pp-trace/CMakeLists.txt?rev=373694&r1=373693&r2=373694&view=diff
==============================================================================
--- clang-tools-extra/trunk/pp-trace/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/pp-trace/CMakeLists.txt Thu Oct  3 22:40:29 2019
@@ -2,7 +2,7 @@ set(LLVM_LINK_COMPONENTS
   Support
   )
 
-add_clang_executable(pp-trace
+add_clang_tool(pp-trace
   PPTrace.cpp
   PPCallbacksTracker.cpp
   )




More information about the cfe-commits mailing list