mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
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.
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user