瀏覽代碼

ENH: fix failing tests on mac

Bill Hoffman 19 年之前
父節點
當前提交
21f3a18bee
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      Source/cmGlobalXCodeGenerator.cxx

+ 6 - 3
Source/cmGlobalXCodeGenerator.cxx

@@ -954,7 +954,6 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
       }
     }
   makefileStream << "\n\n";
-  
   for(std::vector<cmCustomCommand>::const_iterator i = commands.begin();
       i != commands.end(); ++i)
     {
@@ -963,8 +962,12 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
       {
       bool escapeOldStyle = cc.GetEscapeOldStyle();
       bool escapeAllowMakeVars = cc.GetEscapeAllowMakeVars();
-      makefileStream << "\n#" << "Custom command rule: " << 
-        cc.GetComment() << "\n";
+      makefileStream << "\n#" << "Custom command rule: ";
+      if(cc.GetComment())
+        {
+        makefileStream << cc.GetComment();
+        }
+      makefileStream << "\n";
       const std::vector<std::string>& outputs = cc.GetOutputs();
       if(!outputs.empty())
         {