[clang-reorder-fields] Switch to add_clang_tool
authorShoaib Meenai <smeenai@fb.com>
Thu, 2 Nov 2017 01:10:05 +0000 (01:10 +0000)
committerShoaib Meenai <smeenai@fb.com>
Thu, 2 Nov 2017 01:10:05 +0000 (01:10 +0000)
`add_clang_tool` invokes `add_clang_executable` internally, but it also
takes care of setting up the install rule. It also adds an `install-*`
build target, which is required for `LLVM_DISTRIBUTION_COMPONENTS`.

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

llvm-svn: 317149

clang-tools-extra/clang-reorder-fields/tool/CMakeLists.txt

index 174e71a..1303924 100644 (file)
@@ -1,4 +1,4 @@
-add_clang_executable(clang-reorder-fields ClangReorderFields.cpp)
+add_clang_tool(clang-reorder-fields ClangReorderFields.cpp)
 
 target_link_libraries(clang-reorder-fields
   clangBasic
 
 target_link_libraries(clang-reorder-fields
   clangBasic
@@ -8,5 +8,3 @@ target_link_libraries(clang-reorder-fields
   clangTooling
   clangToolingCore
   )
   clangTooling
   clangToolingCore
   )
-
-install(TARGETS clang-reorder-fields RUNTIME DESTINATION bin)