Merge topic 'ctest-S-message-STATUS'

f33d875a CTest: Implement message(STATUS) output for 'ctest -S' scripts
This commit is contained in:
Brad King 2014-07-07 08:54:28 -04:00 committed by CMake Topic Stage
commit dcac4a3ff4
1 changed files with 11 additions and 0 deletions

View File

@ -317,6 +317,15 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
return retVal;
}
static void ctestScriptProgressCallback(const char *m, float, void* cd)
{
cmCTest* ctest = static_cast<cmCTest*>(cd);
if(m && *m)
{
cmCTestLog(ctest, HANDLER_OUTPUT, "-- " << m << std::endl);
}
}
void cmCTestScriptHandler::CreateCMake()
{
// create a cmake instance to read the configuration script
@ -334,6 +343,8 @@ void cmCTestScriptHandler::CreateCMake()
this->LocalGenerator = this->GlobalGenerator->CreateLocalGenerator();
this->Makefile = this->LocalGenerator->GetMakefile();
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
// Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR.
// Also, some commands need Makefile->GetCurrentDirectory().
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();