summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-24 13:27:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-04-24 13:27:48 (GMT)
commitfa338c97d7e1cd320f79a6eed3b7913fd88ee890 (patch)
treea6b49a7e1f156b1f7b63a02e379143bc0b9a30ed /Source/cmGeneratorTarget.cxx
parent8b0016ab658e2b96211c33055b8cf38b6d4a6d94 (diff)
parent73020305afea789519b42ae59a5940e1dbc26e1a (diff)
downloadCMake-fa338c97d7e1cd320f79a6eed3b7913fd88ee890.zip
CMake-fa338c97d7e1cd320f79a6eed3b7913fd88ee890.tar.gz
CMake-fa338c97d7e1cd320f79a6eed3b7913fd88ee890.tar.bz2
Merge topic 'clang-tidy'
73020305 clang-tidy: avoid copy b432e933 clang-tidy: use .empty() to check emptyness 012972a9 clang-tidy: remove reduntant .data() calls b26577c9 clang-tidy: remove else after break and continue Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !734
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx66
1 files changed, 29 insertions, 37 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 10a7706..a0f677b 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3973,15 +3973,14 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
<< theTarget->GetName() << "\".\n";
cmSystemTools::Error(e.str().c_str());
break;
- } else {
- propContent = consistent.second;
- continue;
}
- } else {
- // Explicitly set on target and not set in iface. Can't disagree.
+ propContent = consistent.second;
continue;
}
- } else if (impliedByUse) {
+ // Explicitly set on target and not set in iface. Can't disagree.
+ continue;
+ }
+ if (impliedByUse) {
propContent = impliedValue<PropertyType>(propContent);
if (ifaceIsSet) {
@@ -3999,43 +3998,36 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
<< "\" is in conflict.\n";
cmSystemTools::Error(e.str().c_str());
break;
- } else {
- propContent = consistent.second;
- continue;
}
- } else {
- // Implicitly set on target and not set in iface. Can't disagree.
+ propContent = consistent.second;
continue;
}
- } else {
- if (ifaceIsSet) {
- if (propInitialized) {
- std::pair<bool, PropertyType> consistent =
- consistentProperty(propContent, ifacePropContent, t);
- report += reportEntry;
- report += compatibilityAgree(t, propContent != consistent.second);
- if (!consistent.first) {
- std::ostringstream e;
- e << "The INTERFACE_" << p << " property of \""
- << theTarget->GetName() << "\" does\nnot agree with the value "
- "of "
- << p << " already determined\nfor \"" << tgt->GetName()
- << "\".\n";
- cmSystemTools::Error(e.str().c_str());
- break;
- } else {
- propContent = consistent.second;
- continue;
- }
- } else {
- report += reportEntry + "(Interface set)\n";
- propContent = ifacePropContent;
- propInitialized = true;
+ // Implicitly set on target and not set in iface. Can't disagree.
+ continue;
+ }
+ if (ifaceIsSet) {
+ if (propInitialized) {
+ std::pair<bool, PropertyType> consistent =
+ consistentProperty(propContent, ifacePropContent, t);
+ report += reportEntry;
+ report += compatibilityAgree(t, propContent != consistent.second);
+ if (!consistent.first) {
+ std::ostringstream e;
+ e << "The INTERFACE_" << p << " property of \""
+ << theTarget->GetName() << "\" does\nnot agree with the value of "
+ << p << " already determined\nfor \"" << tgt->GetName() << "\".\n";
+ cmSystemTools::Error(e.str().c_str());
+ break;
}
- } else {
- // Not set. Nothing to agree on.
+ propContent = consistent.second;
continue;
}
+ report += reportEntry + "(Interface set)\n";
+ propContent = ifacePropContent;
+ propInitialized = true;
+ } else {
+ // Not set. Nothing to agree on.
+ continue;
}
}