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
This commit is contained in:
Brad King 2020-01-28 13:49:43 -05:00
parent 5b43aa7755
commit 58b0674687

View File

@ -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()) {