summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2017-11-30 22:35:02 +0000
committerShoaib Meenai <smeenai@fb.com>2017-11-30 22:35:02 +0000
commitb44ae5f9b10d26651777750c3b01368399a1504d (patch)
tree8848e291856e110f0035f2734885b94467388b60 /cmake
parente0a9480f64277460bf76a6683debe15cd4ab1aac (diff)
[clang] Use add_llvm_install_targets
Use this function to create the install targets rather than doing so manually, which gains us the `-stripped` install targets to perform stripped installations. Differential Revision: https://reviews.llvm.org/D40675 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/AddClang.cmake16
1 files changed, 6 insertions, 10 deletions
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
index e657059744..c09a8423f9 100644
--- a/cmake/modules/AddClang.cmake
+++ b/cmake/modules/AddClang.cmake
@@ -104,11 +104,9 @@ macro(add_clang_library name)
RUNTIME DESTINATION bin)
if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
- add_custom_target(install-${name}
- DEPENDS ${name}
- COMMAND "${CMAKE_COMMAND}"
- -DCMAKE_INSTALL_COMPONENT=${name}
- -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ add_llvm_install_targets(install-${name}
+ DEPENDS ${name}
+ COMPONENT ${name})
endif()
endif()
set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name})
@@ -147,11 +145,9 @@ macro(add_clang_tool name)
COMPONENT ${name})
if(NOT CMAKE_CONFIGURATION_TYPES)
- add_custom_target(install-${name}
- DEPENDS ${name}
- COMMAND "${CMAKE_COMMAND}"
- -DCMAKE_INSTALL_COMPONENT=${name}
- -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ add_llvm_install_targets(install-${name}
+ DEPENDS ${name}
+ COMPONENT ${name})
endif()
set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name})
endif()