summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-19 17:38:26 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-07 12:52:40 (GMT)
commitd9586f83f11f56d8d9f88892f543918f50e9525c (patch)
tree8923b0328f6161f61220c3c0c9bd3f2442bd312d /Source/cmTarget.cxx
parent3156275bc74e355f8309617344693a0f14b7a370 (diff)
downloadCMake-d9586f83f11f56d8d9f88892f543918f50e9525c.zip
CMake-d9586f83f11f56d8d9f88892f543918f50e9525c.tar.gz
CMake-d9586f83f11f56d8d9f88892f543918f50e9525c.tar.bz2
cmTarget: Simplify INTERFACE_COMPILE_OPTIONS usage requirement lookup
Use the AddInterfaceEntries helper to avoid duplication.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx42
1 files changed, 3 insertions, 39 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a87e98d..2cc21f5 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2430,45 +2430,9 @@ void cmTarget::GetCompileOptions(std::vector<std::string> &result,
if (!this->Internal->CacheLinkInterfaceCompileOptionsDone[config])
{
- for (std::vector<cmValueWithOrigin>::const_iterator
- it = this->Internal->LinkImplementationPropertyEntries.begin(),
- end = this->Internal->LinkImplementationPropertyEntries.end();
- it != end; ++it)
- {
- if (!cmGeneratorExpression::IsValidTargetName(it->Value)
- && cmGeneratorExpression::Find(it->Value) == std::string::npos)
- {
- continue;
- }
- {
- cmGeneratorExpression ge;
- cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
- ge.Parse(it->Value);
- std::string targetResult = cge->Evaluate(this->Makefile, config,
- false, this, 0, 0);
- if (!this->Makefile->FindTargetToUse(targetResult))
- {
- continue;
- }
- }
- std::string optionGenex = "$<TARGET_PROPERTY:" +
- it->Value + ",INTERFACE_COMPILE_OPTIONS>";
- if (cmGeneratorExpression::Find(it->Value) != std::string::npos)
- {
- // Because it->Value is a generator expression, ensure that it
- // evaluates to the non-empty string before being used in the
- // TARGET_PROPERTY expression.
- optionGenex = "$<$<BOOL:" + it->Value + ">:" + optionGenex + ">";
- }
- cmGeneratorExpression ge(&it->Backtrace);
- cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(
- optionGenex);
-
- this->Internal
- ->CachedLinkInterfaceCompileOptionsEntries[config].push_back(
- new cmTargetInternals::TargetPropertyEntry(cge,
- it->Value));
- }
+ this->Internal->AddInterfaceEntries(
+ this, config, "INTERFACE_COMPILE_OPTIONS",
+ this->Internal->CachedLinkInterfaceCompileOptionsEntries[config]);
}
processCompileOptions(this,