summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-16 15:48:31 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-23 13:14:44 (GMT)
commit962f2c3529d39e293549d16963c59f1508c5a81c (patch)
tree83f00c5eca2bb815e14a7780f2157b4046c76575
parente838e0a977bf3ca07509f4af39d5f93d598f84f4 (diff)
downloadCMake-962f2c3529d39e293549d16963c59f1508c5a81c.zip
CMake-962f2c3529d39e293549d16963c59f1508c5a81c.tar.gz
CMake-962f2c3529d39e293549d16963c59f1508c5a81c.tar.bz2
cmComputeLinkDepends: Simplify CheckWrongConfigItem implementation
Combine the outer two if() conditions into a single one with &&.
-rw-r--r--Source/cmComputeLinkDepends.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 995f191..336097b 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -999,12 +999,9 @@ void cmComputeLinkDepends::CheckWrongConfigItem(int depender_index,
// For CMake 2.4 bug-compatibility we need to consider the output
// directories of targets linked in another configuration as link
// directories.
- if(cmTarget const* tgt
- = this->FindTargetToLink(depender_index, item))
+ cmTarget const* tgt = this->FindTargetToLink(depender_index, item);
+ if(tgt && !tgt->IsImported())
{
- if(!tgt->IsImported())
- {
- this->OldWrongConfigItems.insert(tgt);
- }
+ this->OldWrongConfigItems.insert(tgt);
}
}