瀏覽代碼

BUG: fix issue with too many fast targets being listed

Ken Martin 19 年之前
父節點
當前提交
6580114309
共有 1 個文件被更改,包括 13 次插入8 次删除
  1. 13 8
      Source/cmGlobalUnixMakefileGenerator3.cxx

+ 13 - 8
Source/cmGlobalUnixMakefileGenerator3.cxx

@@ -651,14 +651,19 @@ cmGlobalUnixMakefileGenerator3
         }
       else
         {
-        // Add a fast rule to build the target
-        depends.clear();
-        commands.clear();
-        std::string localName = t->second.GetName();
-        depends.push_back(localName);
-        localName += "/fast";
-        lg->WriteMakeRule(ruleFileStream, "fast build rule for target.",
-                          localName.c_str(), depends, commands, true);        
+        if(t->second.GetName() &&
+           strlen(t->second.GetName()) &&
+           emitted.insert(t->second.GetName()).second)
+          {
+          // Add a fast rule to build the target
+          depends.clear();
+          commands.clear();
+          std::string localName = t->second.GetName();
+          depends.push_back(localName);
+          localName += "/fast";
+          lg->WriteMakeRule(ruleFileStream, "fast build rule for target.",
+                            localName.c_str(), depends, commands, true);
+          }
         }
       }
     }