summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-13 13:19:44 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-13 16:48:43 (GMT)
commitf0ffb1e2d4431c705a37410890f38de5f3cf5526 (patch)
treeee84f755a56943d21642950874b88379ca7a8714 /Source/cmGlobalGenerator.cxx
parentd346805e419b213230e4ff24d8be0100bee7168d (diff)
downloadCMake-f0ffb1e2d4431c705a37410890f38de5f3cf5526.zip
CMake-f0ffb1e2d4431c705a37410890f38de5f3cf5526.tar.gz
CMake-f0ffb1e2d4431c705a37410890f38de5f3cf5526.tar.bz2
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.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx6
1 files 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<std::string>& 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;