Write individual too

This commit is contained in:
Andy Cedilnik 2003-02-12 09:26:47 -05:00
parent fd89ebbbaf
commit 8b1456e7fd
1 changed files with 11 additions and 4 deletions

View File

@ -499,16 +499,15 @@ int cmCTest::UpdateDirectory()
std::string goutput; std::string goutput;
int retVal = 0; int retVal = 0;
bool res = true; bool res = true;
std::ofstream ofs;
if ( !m_ShowOnly ) if ( !m_ShowOnly )
{ {
res = cmSystemTools::RunCommand(command.c_str(), goutput, res = cmSystemTools::RunCommand(command.c_str(), goutput,
retVal, sourceDirectory.c_str(), retVal, sourceDirectory.c_str(),
m_Verbose); m_Verbose);
std::ofstream ofs;
if ( this->OpenOutputFile("Temporary", "LastUpdate.log", ofs) ) if ( this->OpenOutputFile("Temporary", "LastUpdate.log", ofs) )
{ {
ofs << goutput; ofs << goutput << std::endl;;
ofs.close();
} }
} }
else else
@ -562,6 +561,10 @@ int cmCTest::UpdateDirectory()
res = cmSystemTools::RunCommand(logcommand.c_str(), output, res = cmSystemTools::RunCommand(logcommand.c_str(), output,
retVal, sourceDirectory.c_str(), retVal, sourceDirectory.c_str(),
m_Verbose); m_Verbose);
if ( ofs )
{
ofs << output << std::endl;
}
if ( res && retVal == 0) if ( res && retVal == 0)
{ {
//std::cout << output << std::endl; //std::cout << output << std::endl;
@ -764,6 +767,10 @@ int cmCTest::UpdateDirectory()
os << "\t<EndDateTime>" << end_time << "</EndDateTime>\n" os << "\t<EndDateTime>" << end_time << "</EndDateTime>\n"
<< "</Update>" << std::endl; << "</Update>" << std::endl;
if ( ofs )
{
ofs.close();
}
if (! res || retVal ) if (! res || retVal )
{ {