Explorar o código

ENH: Add a dependency from the PACKAGE target to the ALL target so that "make package" will first (essentially) do a "make all"... A similar chunk of code already existed for the make install target. This change makes it easy to build an installer package as part of a dashboard run simply by setting CTEST_BUILD_TARGET to "package".

David Cole %!s(int64=18) %!d(string=hai) anos
pai
achega
546c839d04
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      Source/cmGlobalGenerator.cxx

+ 9 - 0
Source/cmGlobalGenerator.cxx

@@ -1421,6 +1421,15 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
     {
     depends.push_back("preinstall");
     }
+  else
+    {
+    const char* noPackageAll =
+      mf->GetDefinition("CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY");
+    if(!noPackageAll || cmSystemTools::IsOff(noPackageAll))
+      {
+      depends.push_back(this->GetAllTargetName());
+      }
+    }
   if(cmSystemTools::FileExists(configFile.c_str()))
     {
     (*targets)[this->GetPackageTargetName()]