From 95e502ee7c9c751d308f5685f048ba1b555cc038 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Mon, 20 Aug 2012 23:19:44 +0200 Subject: 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 --- Source/cmake.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 ) { -- cgit v0.12