[clang-tools-extra] [cmake] Use add_clang_tool() to install tools
authorMichal Gorny <mgorny@gentoo.org>
Fri, 4 Oct 2019 05:40:29 +0000 (05:40 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Fri, 4 Oct 2019 05:40:29 +0000 (05:40 +0000)
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

llvm-svn: 373694

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

index 26aa760..d15a8b1 100644 (file)
@@ -14,6 +14,3 @@ target_link_libraries(clang-apply-replacements
   clangToolingCore
   clangToolingRefactoring
   )
-
-install(TARGETS clang-apply-replacements
-  RUNTIME DESTINATION bin)
index be4b830..702bad3 100644 (file)
@@ -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-namespace
   clangTooling
   clangToolingCore
   )
-
-install(TARGETS clang-change-namespace
-  RUNTIME DESTINATION bin)
index 64278ad..7f101eb 100644 (file)
@@ -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)
index 207995a..5b600a4 100644 (file)
@@ -17,9 +17,6 @@ target_link_libraries(clang-include-fixer
   findAllSymbols
   )
 
-install(TARGETS clang-include-fixer
-  RUNTIME DESTINATION bin)
-
 install(PROGRAMS clang-include-fixer.el
   DESTINATION share/clang
   COMPONENT clang-include-fixer)
index 7bc4f30..b6051e4 100644 (file)
@@ -1,6 +1,6 @@
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
 
-add_clang_executable(clang-move
+add_clang_tool(clang-move
   ClangMove.cpp
   )
 
index d6ac0ae..7071c94 100644 (file)
@@ -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)
index faa1d51..11b45ac 100644 (file)
@@ -2,7 +2,7 @@ set(LLVM_LINK_COMPONENTS
   Support
   )
 
-add_clang_executable(pp-trace
+add_clang_tool(pp-trace
   PPTrace.cpp
   PPCallbacksTracker.cpp
   )