瀏覽代碼

CodeBlocks: fix unescaped command quotes when used with nmake

Nils Gladitz 11 年之前
父節點
當前提交
f2b47197dc
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      Source/cmExtraCodeBlocksGenerator.cxx

+ 5 - 3
Source/cmExtraCodeBlocksGenerator.cxx

@@ -761,10 +761,12 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand(
   std::string command = make;
   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);
-    command += " /NOLOGO /f "";
-    command += makefileName;
-    command += "" ";
+    command += " /NOLOGO /f ";
+    command += cmXMLSafe(makefileName).str();
     command += " VERBOSE=1 ";
     command += target;
     }