Merge topic 'resolve-full-path-at-generate-time'

48d1456b3d UnityBuild: Resolve full paths of unity source includes
ec2f130aa9 cmFileAPI: Resolve full path in PCH source comparison

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4029
This commit is contained in:
Brad King
2019-11-12 14:34:00 +00:00
committed by Kitware Robot
2 changed files with 2 additions and 2 deletions

View File

@@ -875,7 +875,7 @@ CompileData Target::BuildCompileData(cmSourceFile* sf)
if (!pchSource.empty() && !sf->GetProperty("SKIP_PRECOMPILE_HEADERS")) {
std::string pchOptions;
if (sf->GetFullPath() == pchSource) {
if (sf->ResolveFullPath() == pchSource) {
pchOptions =
this->GT->GetPchCreateCompileOptions(this->Config, fd.Language);
} else {

View File

@@ -2486,7 +2486,7 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target)
file << beforeInclude << "\n";
}
file << "#include \"" << sf->GetFullPath() << "\"\n";
file << "#include \"" << sf->ResolveFullPath() << "\"\n";
if (afterInclude) {
file << afterInclude << "\n";