VS: Fix using PCH from source with COMPILE_OPTIONS

If a source file gets per-source flags from both PCH and custom
`COMPILE_OPTIONS`, combine them correctly.

Fixes: #20694, #20456
This commit is contained in:
Brad King
2020-05-11 11:56:50 -04:00
parent 4c82f309c5
commit 6b2fb4ffd2
2 changed files with 4 additions and 1 deletions

View File

@@ -2345,7 +2345,7 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
pchOptions =
this->GeneratorTarget->GetPchUseCompileOptions(config, lang);
}
customAndPchOptions += pchOptions;
customAndPchOptions = cmStrCat(customAndPchOptions, ';', pchOptions);
}
// if we have flags or defines for this config then