From: Chris Bieneman Date: Thu, 17 Sep 2015 18:30:20 +0000 (+0000) Subject: [CMake] Add install-clang target to install just the clang executable X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be47e1a2ba7caed4f72e63c8e26134f046a6f2dd;p=clang [CMake] Add install-clang target to install just the clang executable For the llvm-tools we're generating install-${tool} targets which are very useful. We should have one for clang too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247912 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt index 708813c9de..c966b0b6c5 100644 --- a/tools/driver/CMakeLists.txt +++ b/tools/driver/CMakeLists.txt @@ -79,7 +79,13 @@ set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${clang_cl}) install(TARGETS clang - RUNTIME DESTINATION bin) + RUNTIME DESTINATION bin + COMPONENT clang) +add_custom_target(install-clang + DEPENDS clang + COMMAND "${CMAKE_COMMAND}" + -DCMAKE_INSTALL_COMPONENT=clang + -P "${CMAKE_BINARY_DIR}/cmake_install.cmake") # Create the clang++ and clang-cl symlinks at installation time. install(SCRIPT clang_symlink.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\")