diff options
author | Chris Bieneman <beanz@apple.com> | 2016-02-23 20:33:15 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-02-23 20:33:15 +0000 |
commit | 96ee7ab00281089a70a4b6d2ac8e0716b858eb58 (patch) | |
tree | 6e8693edbb2b4ed0860a9d6c56c07b50a088f81c /tools/clang-format | |
parent | 4121881553c4c8e0fb2f9edc6fddd9cf8e1bd93f (diff) | |
download | clang-96ee7ab00281089a70a4b6d2ac8e0716b858eb58.tar.gz |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-format')
-rw-r--r-- | tools/clang-format/CMakeLists.txt | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/tools/clang-format/CMakeLists.txt b/tools/clang-format/CMakeLists.txt index 6ef0c2280f..a13633eaef 100644 --- a/tools/clang-format/CMakeLists.txt +++ b/tools/clang-format/CMakeLists.txt @@ -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) |