r261680 - [CMake] Add install-clang-format target by migrating to add_clang_tool
Chris Bieneman via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 23 12:33:15 PST 2016
Author: cbieneman
Date: Tue Feb 23 14:33:15 2016
New Revision: 261680
URL: http://llvm.org/viewvc/llvm-project?rev=261680&view=rev
Log:
[CMake] Add install-clang-format target by migrating to add_clang_tool
This change migrates clang-format to add_clang_tool which makes a component-based install target. To support component-based installation the extra installed scripts all need to have the "clang-format" component too.
Modified:
cfe/trunk/tools/clang-format/CMakeLists.txt
Modified: cfe/trunk/tools/clang-format/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/CMakeLists.txt?rev=261680&r1=261679&r2=261680&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-format/CMakeLists.txt Tue Feb 23 14:33:15 2016
@@ -1,6 +1,6 @@
set(LLVM_LINK_COMPONENTS support)
-add_clang_executable(clang-format
+add_clang_tool(clang-format
ClangFormat.cpp
)
@@ -19,10 +19,21 @@ if( LLVM_USE_SANITIZE_COVERAGE )
add_subdirectory(fuzzer)
endif()
-install(TARGETS clang-format RUNTIME DESTINATION bin)
-install(PROGRAMS clang-format-bbedit.applescript DESTINATION share/clang)
-install(PROGRAMS clang-format-diff.py DESTINATION share/clang)
-install(PROGRAMS clang-format-sublime.py DESTINATION share/clang)
-install(PROGRAMS clang-format.el DESTINATION share/clang)
-install(PROGRAMS clang-format.py DESTINATION share/clang)
-install(PROGRAMS git-clang-format DESTINATION bin)
+install(PROGRAMS clang-format-bbedit.applescript
+ DESTINATION share/clang
+ COMPONENT clang-format)
+install(PROGRAMS clang-format-diff.py
+ DESTINATION share/clang
+ COMPONENT clang-format)
+install(PROGRAMS clang-format-sublime.py
+ DESTINATION share/clang
+ COMPONENT clang-format)
+install(PROGRAMS clang-format.el
+ DESTINATION share/clang
+ COMPONENT clang-format)
+install(PROGRAMS clang-format.py
+ DESTINATION share/clang
+ COMPONENT clang-format)
+install(PROGRAMS git-clang-format
+ DESTINATION bin
+ COMPONENT clang-format)
More information about the cfe-commits
mailing list