Skip to content

Commit cb46b69

Browse files
committed
[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 llvm-svn: 373694
1 parent 7f379a3 commit cb46b69

File tree

7 files changed

+5
-19
lines changed

7 files changed

+5
-19
lines changed

clang-tools-extra/clang-apply-replacements/tool/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@ target_link_libraries(clang-apply-replacements
1414
clangToolingCore
1515
clangToolingRefactoring
1616
)
17-
18-
install(TARGETS clang-apply-replacements
19-
RUNTIME DESTINATION bin)

clang-tools-extra/clang-change-namespace/tool/CMakeLists.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set(LLVM_LINK_COMPONENTS
44
Support
55
)
66

7-
add_clang_executable(clang-change-namespace
7+
add_clang_tool(clang-change-namespace
88
ClangChangeNamespace.cpp
99
)
1010
target_link_libraries(clang-change-namespace
@@ -20,6 +20,3 @@ target_link_libraries(clang-change-namespace
2020
clangTooling
2121
clangToolingCore
2222
)
23-
24-
install(TARGETS clang-change-namespace
25-
RUNTIME DESTINATION bin)

clang-tools-extra/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
22

3-
add_clang_executable(find-all-symbols
3+
add_clang_tool(find-all-symbols
44
FindAllSymbolsMain.cpp
55
)
66

@@ -16,9 +16,6 @@ target_link_libraries(find-all-symbols
1616
findAllSymbols
1717
)
1818

19-
install(TARGETS find-all-symbols
20-
RUNTIME DESTINATION bin)
21-
2219
install(PROGRAMS run-find-all-symbols.py
2320
DESTINATION share/clang
2421
COMPONENT find-all-symbols)

clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ target_link_libraries(clang-include-fixer
1717
findAllSymbols
1818
)
1919

20-
install(TARGETS clang-include-fixer
21-
RUNTIME DESTINATION bin)
22-
2320
install(PROGRAMS clang-include-fixer.el
2421
DESTINATION share/clang
2522
COMPONENT clang-include-fixer)

clang-tools-extra/clang-move/tool/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
22

3-
add_clang_executable(clang-move
3+
add_clang_tool(clang-move
44
ClangMove.cpp
55
)
66

clang-tools-extra/clang-query/tool/CMakeLists.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
22

3-
add_clang_executable(clang-query
3+
add_clang_tool(clang-query
44
ClangQuery.cpp
55
)
66
target_link_libraries(clang-query
@@ -14,5 +14,3 @@ target_link_libraries(clang-query
1414
clangSerialization
1515
clangTooling
1616
)
17-
18-
install(TARGETS clang-query RUNTIME DESTINATION bin)

clang-tools-extra/pp-trace/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ set(LLVM_LINK_COMPONENTS
22
Support
33
)
44

5-
add_clang_executable(pp-trace
5+
add_clang_tool(pp-trace
66
PPTrace.cpp
77
PPCallbacksTracker.cpp
88
)

0 commit comments

Comments
 (0)