summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2017-12-15 13:20:13 +0000
committerIlya Biryukov <ibiryukov@google.com>2017-12-15 13:20:13 +0000
commitc81be8bd5687559a577b3828f623261b5edce399 (patch)
tree3d11683887aa203584170b63fbac070444777646 /include
parentaa1acfa32974066bc8fbc5ffba88cdd9c591fbe4 (diff)
Added a separate install target for compilert-rt-headers
Summary: This patch adds a new install target `install-compilert-rt-headers`, that is similar to `install-clang-headers`. It allows to install the headers without installing all of compiler-rt. Reviewers: alekseyshl, beanz Reviewed By: beanz Subscribers: smeenai, beanz, mgorny, #sanitizers, kcc, llvm-commits Differential Revision: https://reviews.llvm.org/D41244 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320808 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/CMakeLists.txt20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index f5cb09fd8..f7efb102a 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -23,7 +23,7 @@ endif(COMPILER_RT_BUILD_XRAY)
set(COMPILER_RT_HEADERS
${SANITIZER_HEADERS}
- ${XRAY_HEADERS})
+ ${XRAY_HEADERS})
set(output_dir ${COMPILER_RT_OUTPUT_DIR}/include)
@@ -45,9 +45,27 @@ set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc")
# Install sanitizer headers.
install(FILES ${SANITIZER_HEADERS}
+ COMPONENT compiler-rt-headers
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer)
# Install xray headers.
install(FILES ${XRAY_HEADERS}
+ COMPONENT compiler-rt-headers
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray)
+
+if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs.
+ add_custom_target(install-compiler-rt-headers
+ DEPENDS compiler-rt-headers
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT="compiler-rt-headers"
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
+ USES_TERMINAL)
+ add_custom_target(install-compiler-rt-headers-stripped
+ DEPENDS compiler-rt-headers
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT="compiler-rt-headers"
+ -DCMAKE_INSTALL_DO_STRIP=1
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
+ USES_TERMINAL)
+endif()