summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-09-13 07:57:43 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-07 06:37:58 (GMT)
commit7b6dc0fe45c7064ad741461bfaf19028e8539c78 (patch)
tree048e3eae0cb243af3ea5f6e5970d42e4064201d6 /Source/cmTarget.cxx
parent33f87bb1f503c09a6b8018edf97b615f0e7f713d (diff)
downloadCMake-7b6dc0fe45c7064ad741461bfaf19028e8539c78.zip
CMake-7b6dc0fe45c7064ad741461bfaf19028e8539c78.tar.gz
CMake-7b6dc0fe45c7064ad741461bfaf19028e8539c78.tar.bz2
cmGeneratorTarget: Inline GetSourceFiles from cmTarget.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx49
1 files changed, 6 insertions, 43 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index fc9e963..8ff729f 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -101,9 +101,7 @@ public:
HeadToLinkImplementationMap> LinkImplMapType;
LinkImplMapType LinkImplMap;
- typedef std::map<std::string, std::vector<cmSourceFile*> >
- SourceFilesMapType;
- SourceFilesMapType SourceFilesMap;
+ cmTarget::SourceFilesMapType SourceFilesMap;
std::set<cmLinkItem> UtilityItems;
bool UtilityItemsDone;
@@ -409,6 +407,11 @@ void cmTarget::Compute()
this->Internal->SourceItems, true);
}
+cmTarget::SourceFilesMapType& cmTarget::GetSourceFilesMap() const
+{
+ return this->Internal->SourceFilesMap;
+}
+
//----------------------------------------------------------------------------
void cmTarget::AddUtility(const std::string& u, cmMakefile *makefile)
{
@@ -736,46 +739,6 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
}
//----------------------------------------------------------------------------
-void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files,
- const std::string& config) const
-{
-
- // Lookup any existing link implementation for this configuration.
- std::string key = cmSystemTools::UpperCase(config);
-
- if(!this->LinkImplementationLanguageIsContextDependent)
- {
- files = this->Internal->SourceFilesMap.begin()->second;
- return;
- }
-
- cmTargetInternals::SourceFilesMapType::iterator
- it = this->Internal->SourceFilesMap.find(key);
- if(it != this->Internal->SourceFilesMap.end())
- {
- files = it->second;
- }
- else
- {
- std::vector<std::string> srcs;
- this->GetSourceFiles(srcs, config);
-
- std::set<cmSourceFile*> emitted;
-
- for(std::vector<std::string>::const_iterator i = srcs.begin();
- i != srcs.end(); ++i)
- {
- cmSourceFile* sf = this->Makefile->GetOrCreateSource(*i);
- if (emitted.insert(sf).second)
- {
- files.push_back(sf);
- }
- }
- this->Internal->SourceFilesMap[key] = files;
- }
-}
-
-//----------------------------------------------------------------------------
void cmTarget::AddTracedSources(std::vector<std::string> const& srcs)
{
if (!srcs.empty())