cmComputeLinkDepends: Simplify CheckWrongConfigItem implementation

Combine the outer two if() conditions into a single one with &&.
This commit is contained in:
Brad King 2014-06-16 11:48:31 -04:00
parent e838e0a977
commit 962f2c3529

View File

@ -999,12 +999,9 @@ void cmComputeLinkDepends::CheckWrongConfigItem(int depender_index,
// For CMake 2.4 bug-compatibility we need to consider the output // For CMake 2.4 bug-compatibility we need to consider the output
// directories of targets linked in another configuration as link // directories of targets linked in another configuration as link
// directories. // directories.
if(cmTarget const* tgt cmTarget const* tgt = this->FindTargetToLink(depender_index, item);
= this->FindTargetToLink(depender_index, item)) if(tgt && !tgt->IsImported())
{ {
if(!tgt->IsImported()) this->OldWrongConfigItems.insert(tgt);
{
this->OldWrongConfigItems.insert(tgt);
}
} }
} }