Browse Source

BUG: make sure ctest sees the output of the cmake run in build and test cases, it was not...

Bill Hoffman 17 years ago
parent
commit
bf3598bab4
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Source/CTest/cmCTestBuildAndTestHandler.cxx

+ 8 - 0
Source/CTest/cmCTestBuildAndTestHandler.cxx

@@ -143,6 +143,13 @@ void CMakeMessageCallback(const char* m, const char*, bool&, void* s)
   *out += "\n";
 }
 
+void CMakeProgressCallback(const char*msg, float , void * s)
+{
+  std::string* out = (std::string*)s;
+  *out += msg;
+  *out += "\n";
+}
+
 //----------------------------------------------------------------------
 void CMakeStdoutCallback(const char* m, int len, void* s)
 {
@@ -210,6 +217,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
 
   // should we cmake?
   cmake cm;
+  cm.SetProgressCallback(CMakeProgressCallback, &cmakeOutString); 
   cm.SetGlobalGenerator(cm.CreateGlobalGenerator(
       this->BuildGenerator.c_str()));