cmMakefile: DeMorgan-invert condition

This commit is contained in:
Stephen Kelly 2016-10-07 20:13:34 +02:00
parent 4457a9f181
commit 148b83a121

View File

@ -1232,10 +1232,10 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target,
cmTarget* tgt = this->GetGlobalGenerator()->FindTarget(lib);
if (tgt) {
// if it is not a static or shared library then you can not link to it
if (!((tgt->GetType() == cmState::STATIC_LIBRARY) ||
(tgt->GetType() == cmState::SHARED_LIBRARY) ||
(tgt->GetType() == cmState::INTERFACE_LIBRARY) ||
tgt->IsExecutableWithExports())) {
if ((tgt->GetType() != cmState::STATIC_LIBRARY) &&
(tgt->GetType() != cmState::SHARED_LIBRARY) &&
(tgt->GetType() != cmState::INTERFACE_LIBRARY) &&
!tgt->IsExecutableWithExports()) {
std::ostringstream e;
e << "Target \"" << lib << "\" of type "
<< cmState::GetTargetTypeName(tgt->GetType())