diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-02-12 12:48:47 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-02-24 15:43:24 (GMT) |
commit | a6dd4990dbfa1afadbaeea33250e52affa5e00d9 (patch) | |
tree | f1720cf0b37680239ed1d2301c3ae1131080ff4a /Source | |
parent | b8b99cc1e5efa8f1513ceb3025c66f3b28fc5bab (diff) | |
download | CMake-a6dd4990dbfa1afadbaeea33250e52affa5e00d9.zip CMake-a6dd4990dbfa1afadbaeea33250e52affa5e00d9.tar.gz CMake-a6dd4990dbfa1afadbaeea33250e52affa5e00d9.tar.bz2 |
cmTarget: Create a temporary cmTarget in checkInterfacePropertyCompatibility
This simplifies further refactoring.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ea031cd..eca8bb7 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4459,23 +4459,24 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt, // target itself has a POSITION_INDEPENDENT_CODE which disagrees // with a dependency. - if (!li->Target) + cmTarget const* theTarget = li->Target; + if (!theTarget) { continue; } - const bool ifaceIsSet = li->Target->GetProperties() + const bool ifaceIsSet = theTarget->GetProperties() .find("INTERFACE_" + p) - != li->Target->GetProperties().end(); + != theTarget->GetProperties().end(); PropertyType ifacePropContent = - getTypedProperty<PropertyType>(li->Target, + getTypedProperty<PropertyType>(theTarget, ("INTERFACE_" + p).c_str(), 0); std::string reportEntry; if (ifaceIsSet) { reportEntry += " * Target \""; - reportEntry += li->Target->GetName(); + reportEntry += theTarget->GetName(); reportEntry += "\" property value \""; reportEntry += valueAsString<PropertyType>(ifacePropContent); reportEntry += "\" "; @@ -4496,7 +4497,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt, e << "Property " << p << " on target \"" << tgt->GetName() << "\" does\nnot match the " "INTERFACE_" << p << " property requirement\nof " - "dependency \"" << li->Target->GetName() << "\".\n"; + "dependency \"" << theTarget->GetName() << "\".\n"; cmSystemTools::Error(e.str().c_str()); break; } @@ -4530,7 +4531,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt, << tgt->GetName() << "\" is\nimplied to be " << defaultValue << " because it was used to determine the link libraries\n" "already. The INTERFACE_" << p << " property on\ndependency \"" - << li->Target->GetName() << "\" is in conflict.\n"; + << theTarget->GetName() << "\" is in conflict.\n"; cmSystemTools::Error(e.str().c_str()); break; } @@ -4561,7 +4562,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt, { cmOStringStream e; e << "The INTERFACE_" << p << " property of \"" - << li->Target->GetName() << "\" does\nnot agree with the value " + << theTarget->GetName() << "\" does\nnot agree with the value " "of " << p << " already determined\nfor \"" << tgt->GetName() << "\".\n"; cmSystemTools::Error(e.str().c_str()); |