Jelajahi Sumber

VS: Tell VS 16.4 not to verify SYMBOLIC custom command inputs

Extend the fix from commit 0578239d3a (VS: Tell VS 16.4 not to verify
SYMBOLIC custom command outputs, 2019-09-23, v3.15.4~2^2) to apply to
SYMBOLIC *inputs* too.  This is needed when there is a chain of custom
commands that use symbolic paths for ordering.

Fixes: #20179
Brad King 5 tahun lalu
induk
melakukan
58b0674687
1 mengubah file dengan 7 tambahan dan 1 penghapusan
  1. 7 1
      Source/cmVisualStudio10TargetGenerator.cxx

+ 7 - 1
Source/cmVisualStudio10TargetGenerator.cxx

@@ -1404,6 +1404,7 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
     std::string comment = lg->ConstructComment(ccg);
     comment = cmVS10EscapeComment(comment);
     std::string script = lg->ConstructScript(ccg);
+    bool symbolic = false;
     // input files for custom command
     std::stringstream additional_inputs;
     {
@@ -1430,6 +1431,12 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
           ConvertToWindowsSlash(dep);
           additional_inputs << sep << dep;
           sep = ";";
+          if (!symbolic) {
+            if (cmSourceFile* sf = this->Makefile->GetSource(
+                  dep, cmSourceFileLocationKind::Known)) {
+              symbolic = sf->GetPropertyAsBool("SYMBOLIC");
+            }
+          }
         }
       }
       if (this->ProjectType != csproj) {
@@ -1438,7 +1445,6 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
     }
     // output files for custom command
     std::stringstream outputs;
-    bool symbolic = false;
     {
       const char* sep = "";
       for (std::string const& o : ccg.GetOutputs()) {