Merge topic 'ErrorIfCTEST_USE_LAUNCHERSSetButLauncherRuleNotSet'

95e502e error out if CTEST_USE_LAUNCHERS is TRUE but RULE_LAUNCH_* are not set
This commit is contained in:
Brad King 2012-08-30 11:54:13 -04:00 committed by CMake Topic Stage
commit 907019b338
1 changed files with 11 additions and 0 deletions

View File

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