[Cmake] Re: [vtk-developers] [bug] wrong CMAKE_COMMAND (win32)

Sebastien BARRE sebastien at barre.nom.fr
Fri Aug 31 15:00:59 EDT 2001


At 31/08/01 13:17, William A. Hoffman wrote:
>So, I would not add an ifdef , but rather just change the cmDSPWriter.cxx 
>to change all executable commands to windows style before output.   I 
>would use the CleanUpWindowsPaths  function John wrote.

Following your adives...

in cmDSPWriter::WriteDSPFile

I changed :

         for(cmSourceGroup::Commands::const_iterator c = commands.begin();
             c != commands.end(); ++c)
           {
           totalCommandStr += "\n\t";
           totalCommandStr += c->first;
           totalCommand.Merge(c->second);
           }

by

         std::string temp;
         for(cmSourceGroup::Commands::const_iterator c = commands.begin();
             c != commands.end(); ++c)
           {
           totalCommandStr += "\n\t";
           temp= c->first;
           cmSystemTools::CleanUpWindowsSlashes(temp);
           totalCommandStr += temp;
           totalCommand.Merge(c->second);
           }

in cmDSPWriter::WriteCustomRule :

I'm not sure about the following one, but I changed :

     fout << "USERDEP__HACK=";
     for(std::set<std::string>::const_iterator d = depends.begin();
         d != depends.end(); ++d)
       {
         fout << "\\\n\t" << cmSystemTools::EscapeSpaces(d->c_str());
       }

by

     fout << "USERDEP__HACK=";
     std::string temp;
     for(std::set<std::string>::const_iterator d = depends.begin();
         d != depends.end(); ++d)
       {
       temp = *d;
       cmSystemTools::CleanUpWindowsSlashes(temp);
       fout << "\\\n\t" << cmSystemTools::EscapeSpaces(temp.c_str());
       }

And it worked.
Does it look good to you ?
Shall I commit ?





More information about the CMake mailing list