CodeBlocks: fix unescaped command quotes when used with nmake

This commit is contained in:
Nils Gladitz 2014-01-13 23:15:26 +01:00
parent 071005add1
commit f2b47197dc
1 changed files with 5 additions and 3 deletions

View File

@ -761,10 +761,12 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand(
std::string command = make; std::string command = make;
if (strcmp(this->GlobalGenerator->GetName(), "NMake Makefiles")==0) if (strcmp(this->GlobalGenerator->GetName(), "NMake Makefiles")==0)
{ {
// For Windows ConvertToOutputPath already adds quotes when required.
// These need to be escaped, see
// http://public.kitware.com/Bug/view.php?id=13952
std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile); std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
command += " /NOLOGO /f ""; command += " /NOLOGO /f ";
command += makefileName; command += cmXMLSafe(makefileName).str();
command += "" ";
command += " VERBOSE=1 "; command += " VERBOSE=1 ";
command += target; command += target;
} }