r373785 - [clang] [cmake] Use add_clang_tool() to install all tools

Michal Gorny via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 4 13:28:59 PDT 2019


Author: mgorny
Date: Fri Oct  4 13:28:59 2019
New Revision: 373785

URL: http://llvm.org/viewvc/llvm-project?rev=373785&view=rev
Log:
[clang] [cmake] Use add_clang_tool() to install all tools

Switch clang-check, clang-extdef-mapping and clang-offload-bundler
to use add_clang_tool() rather than add_clang_executable() with a custom
install rule.  This makes them LLVM_DISTRIBUTION_COMPONENTS-friendly.

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

Modified:
    cfe/trunk/tools/clang-check/CMakeLists.txt
    cfe/trunk/tools/clang-extdef-mapping/CMakeLists.txt
    cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt

Modified: cfe/trunk/tools/clang-check/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/CMakeLists.txt?rev=373785&r1=373784&r2=373785&view=diff
==============================================================================
--- cfe/trunk/tools/clang-check/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-check/CMakeLists.txt Fri Oct  4 13:28:59 2019
@@ -4,7 +4,7 @@ set( LLVM_LINK_COMPONENTS
   Support
   )
 
-add_clang_executable(clang-check
+add_clang_tool(clang-check
   ClangCheck.cpp
   )
 
@@ -19,6 +19,3 @@ clang_target_link_libraries(clang-check
   clangStaticAnalyzerFrontend
   clangTooling
   )
-
-install(TARGETS clang-check
-  RUNTIME DESTINATION bin)

Modified: cfe/trunk/tools/clang-extdef-mapping/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-extdef-mapping/CMakeLists.txt?rev=373785&r1=373784&r2=373785&view=diff
==============================================================================
--- cfe/trunk/tools/clang-extdef-mapping/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-extdef-mapping/CMakeLists.txt Fri Oct  4 13:28:59 2019
@@ -3,7 +3,7 @@ set(LLVM_LINK_COMPONENTS
   support
   )
 
-add_clang_executable(clang-extdef-mapping
+add_clang_tool(clang-extdef-mapping
   ClangExtDefMapGen.cpp
   )
 
@@ -16,6 +16,3 @@ clang_target_link_libraries(clang-extdef
   clangSerialization
   clangTooling
   )
-
-install(TARGETS clang-extdef-mapping
-  RUNTIME DESTINATION bin)

Modified: cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt?rev=373785&r1=373784&r2=373785&view=diff
==============================================================================
--- cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt (original)
+++ cfe/trunk/tools/clang-offload-bundler/CMakeLists.txt Fri Oct  4 13:28:59 2019
@@ -4,7 +4,7 @@ if(NOT CLANG_BUILT_STANDALONE)
   set(tablegen_deps intrinsics_gen)
 endif()
 
-add_clang_executable(clang-offload-bundler
+add_clang_tool(clang-offload-bundler
   ClangOffloadBundler.cpp
   
   DEPENDS
@@ -21,5 +21,3 @@ clang_target_link_libraries(clang-offloa
   PRIVATE
   ${CLANG_OFFLOAD_BUNDLER_LIB_DEPS}
   )
-
-install(TARGETS clang-offload-bundler RUNTIME DESTINATION bin)




More information about the cfe-commits mailing list