BUG: Fix generation of some paths into .cmake files in the build tree to escape strings for the CMake language. This fix allows users to put double quotes in the SOVERSION of a shared library.

This commit is contained in:
Brad King 2008-05-10 18:39:06 -04:00
parent 09dd298f63
commit 071725a1c1
2 changed files with 6 additions and 4 deletions

View File

@ -1110,8 +1110,8 @@ cmLocalUnixMakefileGenerator3
for(std::vector<std::string>::const_iterator f = files.begin();
f != files.end(); ++f)
{
fout << "\"" << this->Convert(f->c_str(),START_OUTPUT,UNCHANGED)
<< "\"\n";
std::string fc = this->Convert(f->c_str(),START_OUTPUT,UNCHANGED);
fout << " " << this->EscapeForCMake(fc.c_str()) << "\n";
}
fout << ")\n";
commands.push_back(remove);

View File

@ -933,8 +933,10 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
this->MultipleOutputPairs.begin();
pi != this->MultipleOutputPairs.end(); ++pi)
{
*this->InfoFileStream << " \"" << pi->first << "\" \""
<< pi->second << "\"\n";
*this->InfoFileStream
<< " " << this->LocalGenerator->EscapeForCMake(pi->first.c_str())
<< " " << this->LocalGenerator->EscapeForCMake(pi->second.c_str())
<< "\n";
}
*this->InfoFileStream << " )\n\n";
}