summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-19 00:29:16 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-19 13:58:12 (GMT)
commit33494a507d45871e1a04a071ed8d3bee453986b3 (patch)
tree464d1f07ad2ad624aef8ededebf77ad312e13470 /Source/cmGeneratorTarget.cxx
parentc131e62f7bad6638178074cde45f74008067d9de (diff)
downloadCMake-33494a507d45871e1a04a071ed8d3bee453986b3.zip
CMake-33494a507d45871e1a04a071ed8d3bee453986b3.tar.gz
CMake-33494a507d45871e1a04a071ed8d3bee453986b3.tar.bz2
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.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index d2671cd..aa1f8d1 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -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)) {