mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 12:16:40 +08:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user