Browse Source

ENH: make sure source file depends are used to determine if custom commands are used

Bill Hoffman 20 năm trước cách đây
mục cha
commit
35e36b5b76
1 tập tin đã thay đổi với 6 bổ sung3 xóa
  1. 6 3
      Source/cmTarget.cxx

+ 6 - 3
Source/cmTarget.cxx

@@ -62,10 +62,13 @@ void cmTarget::TraceVSDependencies(std::string projFile,
     // does this sourcefile have object depends on it?
     // If so then add them as well
     const char* additionalDeps = (*i)->GetProperty("OBJECT_DEPENDS");
-    if (additionalDeps)
+    std::vector<std::string> depends = (*i)->GetDepends();
+    if (additionalDeps || depends.size())
       {
-      std::vector<std::string> depends;
-      cmSystemTools::ExpandListArgument(additionalDeps, depends);
+      if(additionalDeps)
+        {
+        cmSystemTools::ExpandListArgument(additionalDeps, depends);
+        }
       for(std::vector<std::string>::iterator id = depends.begin();
           id != depends.end(); ++id)
         {