[llvm] r262427 - [CMake] Add distribution target that is the "just-build" side of install-distribution

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 16:27:12 PST 2016


Author: cbieneman
Date: Tue Mar  1 18:27:12 2016
New Revision: 262427

URL: http://llvm.org/viewvc/llvm-project?rev=262427&view=rev
Log:
[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.

Modified:
    llvm/trunk/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=262427&r1=262426&r2=262427&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Tue Mar  1 18:27:12 2016
@@ -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()




More information about the llvm-commits mailing list