Commit 33494a50 authored by Brad King's avatar Brad King

cmGeneratorTarget: Order usage requirement processing logic consistently

Re-order logic in all `process*` methods so that they all evaluate
generator expressions at the beginning of their loops.
parent c131e62f
......@@ -1139,11 +1139,9 @@ static bool processSources(
bool contextDependent = false;
for (cmGeneratorTarget::TargetPropertyEntry* entry : entries) {
cmLinkImplItem const& item = entry->LinkImplItem;
std::string const& targetName = item.AsStr();
std::vector<std::string> entrySources;
cmSystemTools::ExpandListArgument(entry->Evaluate(tgt->GetLocalGenerator(),
config, false, tgt, tgt,
config, false, tgt,
dagChecker),
entrySources);
......@@ -1151,6 +1149,9 @@ static bool processSources(
contextDependent = true;
}
cmLinkImplItem const& item = entry->LinkImplItem;
std::string const& targetName = item.AsStr();
for (std::string& src : entrySources) {
cmSourceFile* sf = mf->GetOrCreateSource(src);
std::string e;
......@@ -2773,15 +2774,15 @@ static void processIncludeDirectories(
bool debugIncludes, const std::string& language)
{
for (cmGeneratorTarget::TargetPropertyEntry* entry : entries) {
cmLinkImplItem const& item = entry->LinkImplItem;
std::string const& targetName = item.AsStr();
bool const fromImported = item.Target && item.Target->IsImported();
bool const checkCMP0027 = item.FromGenex;
std::vector<std::string> entryIncludes;
cmSystemTools::ExpandListArgument(entry->Evaluate(tgt->GetLocalGenerator(),
config, false, tgt,
dagChecker, language),
entryIncludes);
cmLinkImplItem const& item = entry->LinkImplItem;
std::string const& targetName = item.AsStr();
bool const fromImported = item.Target && item.Target->IsImported();
bool const checkCMP0027 = item.FromGenex;
std::string usedIncludes;
for (std::string& entryInclude : entryIncludes) {
......@@ -3432,15 +3433,15 @@ void processLinkDirectories(
bool debugDirectories, std::string const& language)
{
for (cmGeneratorTarget::TargetPropertyEntry* entry : entries) {
cmLinkImplItem const& item = entry->LinkImplItem;
std::string const& targetName = item.AsStr();
std::vector<std::string> entryDirectories;
cmSystemTools::ExpandListArgument(entry->Evaluate(tgt->GetLocalGenerator(),
config, false, tgt,
dagChecker, language),
entryDirectories);
cmLinkImplItem const& item = entry->LinkImplItem;
std::string const& targetName = item.AsStr();
std::string usedDirectories;
for (std::string& entryDirectory : entryDirectories) {
if (!cmSystemTools::FileIsFullPath(entryDirectory)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment