summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-08-20 21:19:44 (GMT)
committerAlex Neundorf <neundorf@kde.org>2012-08-20 21:19:44 (GMT)
commit95e502ee7c9c751d308f5685f048ba1b555cc038 (patch)
treebd7f2e91b92de399dd9df39bbc647b787c117a20
parentc4306dc8057c45bc5edfd18465f85790800124cd (diff)
downloadCMake-95e502ee7c9c751d308f5685f048ba1b555cc038.zip
CMake-95e502ee7c9c751d308f5685f048ba1b555cc038.tar.gz
CMake-95e502ee7c9c751d308f5685f048ba1b555cc038.tar.bz2
error out if CTEST_USE_LAUNCHERS is TRUE but RULE_LAUNCH_* are not set
Otherwise, CTEST_USE_LAUNCHERS can be set to true in a driving ctest script, and everything looks like it would work and reports 0 build errors, but actually there can be any amount of errors and they are just not reported. By adding this check cmake now errors out if CTEST_USE_LAUNCHERS is enabled, but the RULE properties are not set, which would lead to a not-working ctest run. Alex
-rw-r--r--Source/cmake.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 75aa471..08c2329 100644
--- a/Source/cmake.cxx
+++ b/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 )
{