summaryrefslogtreecommitdiff
path: root/tools/xcode-toolchain
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
commit01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch)
tree4def12e759965de927d963ac65840d663ef9d1ea /tools/xcode-toolchain
parentf0f4822ed4b66e3579e92a89f368f8fb860e218e (diff)
Notes
Diffstat (limited to 'tools/xcode-toolchain')
-rw-r--r--tools/xcode-toolchain/CMakeLists.txt22
1 files changed, 21 insertions, 1 deletions
diff --git a/tools/xcode-toolchain/CMakeLists.txt b/tools/xcode-toolchain/CMakeLists.txt
index 4eacbd320efc..92b24581962b 100644
--- a/tools/xcode-toolchain/CMakeLists.txt
+++ b/tools/xcode-toolchain/CMakeLists.txt
@@ -69,4 +69,24 @@ add_custom_target(install-xcode-toolchain
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_PREFIX=${LLVMToolchainDir}/usr/
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
- ${cmake_3_2_USES_TERMINAL})
+ USES_TERMINAL)
+
+if(LLVM_DISTRIBUTION_COMPONENTS)
+ if(CMAKE_CONFIGURATION_TYPES)
+ message(FATAL_ERROR "LLVM_DISTRIBUTION_COMPONENTS cannot be specified with multi-configuration generators (i.e. Xcode or Visual Studio)")
+ endif()
+
+ add_custom_target(install-distribution-toolchain
+ DEPENDS ${LLVMToolchainDir}/ToolchainInfo.plist distribution)
+
+ foreach(target ${LLVM_DISTRIBUTION_COMPONENTS})
+ add_custom_target(install-distribution-${target}
+ DEPENDS ${target}
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT=${target}
+ -DCMAKE_INSTALL_PREFIX=${LLVMToolchainDir}/usr/
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
+ USES_TERMINAL)
+ add_dependencies(install-distribution-toolchain install-distribution-${target})
+ endforeach()
+endif()