[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.

llvm-svn: 262427
This commit is contained in:
Chris Bieneman 2016-03-02 00:27:12 +00:00
parent 147e927957
commit 2b12f6765b
1 changed files with 7 additions and 0 deletions

View File

@ -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()