diff options
author | Brad King <brad.king@kitware.com> | 2014-06-19 17:37:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-07 12:52:40 (GMT) |
commit | 3156275bc74e355f8309617344693a0f14b7a370 (patch) | |
tree | beebaf78c6a0177962f1c0b7474734c948c4c086 /Source/cmTarget.cxx | |
parent | 363cd33ebe5a8fb495fffc07cf39c59082e83bbf (diff) | |
download | CMake-3156275bc74e355f8309617344693a0f14b7a370.zip CMake-3156275bc74e355f8309617344693a0f14b7a370.tar.gz CMake-3156275bc74e355f8309617344693a0f14b7a370.tar.bz2 |
cmTarget: Simplify INTERFACE_SOURCES usage requirement lookup
Use the AddInterfaceEntries helper to avoid duplication.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 42 |
1 files changed, 3 insertions, 39 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 0ad4ffb..a87e98d 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -774,45 +774,9 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files, if (!this->Internal->CacheLinkInterfaceSourcesDone[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, &dagChecker); - if (!this->Makefile->FindTargetToUse(targetResult)) - { - continue; - } - } - std::string sourceGenex = "$<TARGET_PROPERTY:" + - it->Value + ",INTERFACE_SOURCES>"; - 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. - sourceGenex = "$<$<BOOL:" + it->Value + ">:" + sourceGenex + ">"; - } - cmGeneratorExpression ge(&it->Backtrace); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse( - sourceGenex); - - this->Internal - ->CachedLinkInterfaceSourcesEntries[config].push_back( - new cmTargetInternals::TargetPropertyEntry(cge, - it->Value)); - } + this->Internal->AddInterfaceEntries( + this, config, "INTERFACE_SOURCES", + this->Internal->CachedLinkInterfaceSourcesEntries[config]); } std::vector<std::string>::size_type numFilesBefore = files.size(); |