Parcourir la source

Merge topic 'ErrorIfCTEST_USE_LAUNCHERSSetButLauncherRuleNotSet'

95e502e error out if CTEST_USE_LAUNCHERS is TRUE but RULE_LAUNCH_* are not set
Brad King il y a 13 ans
Parent
commit
907019b338
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11 0
      Source/cmake.cxx

+ 11 - 0
Source/cmake.cxx

@@ -2326,6 +2326,17 @@ int cmake::ActualConfigure()
     this->CacheManager->RemoveCacheEntry("CMAKE_GENERATOR");
     this->CacheManager->RemoveCacheEntry("CMAKE_EXTRA_GENERATOR");
     }
+
+  cmMakefile* mf=this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile();
+  if (mf->IsOn("CTEST_USE_LAUNCHERS")
+              && !this->GetProperty("RULE_LAUNCH_COMPILE", cmProperty::GLOBAL))
+    {
+    cmSystemTools::Error("CTEST_USE_LAUNCHERS is enabled, but the "
+                        "RULE_LAUNCH_COMPILE global property is not defined.\n"
+                        "Did you forget to include(CTest) in the toplevel "
+                         "CMakeLists.txt ?");
+    }
+
   // only save the cache if there were no fatal errors
   if ( this->GetWorkingMode() == NORMAL_MODE )
     {