mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-12 01:09:47 -06:00
cmTarget: Create cmGeneratorTargets before reading deprecated LOCATION.
The intention is to move generation-semantic cmTarget API to cmGeneratorTarget and then use the latter for generator expressions. This means that each time we read a deprecated LOCATION property, we have to clear and re-populate the container. That must be done each time because the result can change through the configure process, which is why this is deprecated in the first place.
This commit is contained in:
@@ -2950,8 +2950,11 @@ const char *cmTarget::GetProperty(const std::string& prop,
|
||||
}
|
||||
else
|
||||
{
|
||||
cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator();
|
||||
gg->CreateGenerationObjects();
|
||||
cmGeneratorTarget* gt = gg->GetGeneratorTarget(this);
|
||||
this->Properties.SetProperty(
|
||||
prop, this->GetFullPath(configName, false).c_str());
|
||||
prop, gt->Target->GetFullPath(configName, false).c_str());
|
||||
}
|
||||
}
|
||||
// Support "<CONFIG>_LOCATION".
|
||||
@@ -2971,8 +2974,11 @@ const char *cmTarget::GetProperty(const std::string& prop,
|
||||
}
|
||||
else
|
||||
{
|
||||
cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator();
|
||||
gg->CreateGenerationObjects();
|
||||
cmGeneratorTarget* gt = gg->GetGeneratorTarget(this);
|
||||
this->Properties.SetProperty(
|
||||
prop, this->GetFullPath(configName, false).c_str());
|
||||
prop, gt->Target->GetFullPath(configName, false).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user