summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-03-02 00:27:12 +0000
committerChris Bieneman <beanz@apple.com>2016-03-02 00:27:12 +0000
commitc26136be88b5c48ae5a186ce676f112d57cc8791 (patch)
tree4ce925521eea5efd77ffc331250ba3074fb72bf8 /CMakeLists.txt
parent0cd6df9cc162cc5709575e763d7ca8f59817e108 (diff)
[CMake] Add distribution target that is the "just-build" side of install-distribution
This is just a convenience target to allow limiting what you build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d0a32608de82..04cc921ef070 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -778,8 +778,15 @@ if(LLVM_DISTRIBUTION_COMPONENTS)
message(FATAL_ERROR "LLVM_DISTRIBUTION_COMPONENTS cannot be specified with multi-configuration generators (i.e. Xcode or Visual Studio)")
endif()
+ add_custom_target(distribution)
add_custom_target(install-distribution)
foreach(target ${LLVM_DISTRIBUTION_COMPONENTS})
+ if(TARGET ${target})
+ add_dependencies(distribution ${target})
+ else()
+ message(FATAL_ERROR "Specified distribution component '${target}' doesn't have a target")
+ endif()
+
if(TARGET install-${target})
add_dependencies(install-distribution install-${target})
else()