[Cmake-commits] [cmake-commits] hoffman committed cmCTest.cxx 1.343 1.344 cmCTest.h 1.105 1.106

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Jan 9 12:05:25 EST 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv26733/Source

Modified Files:
	cmCTest.cxx cmCTest.h 
Log Message:
ENH: add subproject tag property for ctest


Index: cmCTest.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.h,v
retrieving revision 1.105
retrieving revision 1.106
diff -C 2 -d -r1.105 -r1.106
*** cmCTest.h	5 Jan 2009 19:14:10 -0000	1.105
--- cmCTest.h	9 Jan 2009 17:05:23 -0000	1.106
***************
*** 28,31 ****
--- 28,32 ----
  class cmGeneratedFileStream;
  class cmCTestCommand;
+ class cmCTestScriptHandler;
  
  #define cmCTestLog(ctSelf, logType, msg) \
***************
*** 172,175 ****
--- 173,177 ----
    ///! The max output width
    int GetMaxTestNameWidth() const;
+   int SetMaxTestNameWidth(int w) { this->MaxTestNameWidth = w;}
  
    /**
***************
*** 336,339 ****
--- 338,342 ----
    void SetStreams(std::ostream* out, std::ostream* err)
      { this->StreamOut = out; this->StreamErr = err; }
+   void AddSiteProperties(std::ostream& );
  private:
    std::string ConfigType;

Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.343
retrieving revision 1.344
diff -C 2 -d -r1.343 -r1.344
*** cmCTest.cxx	5 Jan 2009 19:14:10 -0000	1.343
--- cmCTest.cxx	9 Jan 2009 17:05:22 -0000	1.344
***************
*** 1310,1315 ****
--- 1310,1346 ----
         << info.GetProcessorClockFrequency() << "\"\n" 
         << ">" << std::endl;
+   this->AddSiteProperties(ostr); 
+ }
+ 
+ //----------------------------------------------------------------------
+ void cmCTest::AddSiteProperties(std::ostream& ostr)
+ {
+   cmCTestScriptHandler* ch = 
+     static_cast<cmCTestScriptHandler*>(this->GetHandler("script"));
+   const char* subproject = 
+     ch->GetCMake()->GetProperty("SubProject", cmProperty::GLOBAL);
+   if(subproject)
+     { 
+     ostr << "<Subproject name=\"" << subproject << "\">\n";
+     const char* labels = 
+       ch->GetCMake()->GetProperty("SubProjectLabels", cmProperty::GLOBAL);
+     if(labels)
+       {
+       ostr << "  <Labels>\n";
+       std::string l = labels;
+       std::vector<std::string> args;
+       cmSystemTools::ExpandListArgument(l, args);
+       for(std::vector<std::string>::iterator i = args.begin();
+           i != args.end(); ++i)
+         {
+         ostr << "    <Label>" << i->c_str() << "</Label>\n";
+         }
+       ostr << "  </Labels>\n";
+       }
+     ostr << "</Subproject>\n";
+     }
  }
  
+ 
  //----------------------------------------------------------------------
  void cmCTest::EndXML(std::ostream& ostr)
***************
*** 1324,1337 ****
    cmCTest::VectorOfStrings::const_iterator it;
    os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
!     << "<?xml-stylesheet type=\"text/xsl\" "
      "href=\"Dart/Source/Server/XSL/Build.xsl "
      "<file:///Dart/Source/Server/XSL/Build.xsl> \"?>\n"
!     << "<Site BuildName=\"" << this->GetCTestConfiguration("BuildName")
!     << "\" BuildStamp=\""
!     << this->CurrentTag << "-" << this->GetTestModelString() << "\" Name=\""
!     << this->GetCTestConfiguration("Site") << "\" Generator=\"ctest"
!     << cmVersion::GetCMakeVersion()
!     << "\">\n"
!     << "<Notes>" << std::endl;
  
    for ( it = files.begin(); it != files.end(); it ++ )
--- 1355,1369 ----
    cmCTest::VectorOfStrings::const_iterator it;
    os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
!      << "<?xml-stylesheet type=\"text/xsl\" "
      "href=\"Dart/Source/Server/XSL/Build.xsl "
      "<file:///Dart/Source/Server/XSL/Build.xsl> \"?>\n"
!      << "<Site BuildName=\"" << this->GetCTestConfiguration("BuildName")
!      << "\" BuildStamp=\""
!      << this->CurrentTag << "-" << this->GetTestModelString() << "\" Name=\""
!      << this->GetCTestConfiguration("Site") << "\" Generator=\"ctest"
!      << cmVersion::GetCMakeVersion()
!      << "\">\n";
!   this->AddSiteProperties(os);
!   os << "<Notes>" << std::endl;
  
    for ( it = files.begin(); it != files.end(); it ++ )



More information about the Cmake-commits mailing list