From f0ffb1e2d4431c705a37410890f38de5f3cf5526 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 13 May 2021 09:19:44 -0400 Subject: cmGlobalGenerator: Simplify relative path conversion in AddRuleHash Revert commit 204aecdf82 (cmGlobalGenerator: Port configure-time code to cmMakefile., 2015-08-02, v3.4.0-rc1~234^2~8). `AddRuleHash` is generate-time code. --- Source/cmGlobalGenerator.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index cca3bdc..d7da0d3 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -3027,10 +3027,8 @@ void cmGlobalGenerator::AddRuleHash(const std::vector& outputs, } // Shorten the output name (in expected use case). - cmStateDirectory cmDir = - this->GetMakefiles()[0]->GetStateSnapshot().GetDirectory(); - std::string fname = cmDir.ConvertToRelPathIfContained( - this->GetMakefiles()[0]->GetState()->GetBinaryDirectory(), outputs[0]); + std::string fname = + this->LocalGenerators[0]->MaybeRelativeToTopBinDir(outputs[0]); // Associate the hash with this output. this->RuleHashes[fname] = hash; -- cgit v0.12