summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx4
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx8
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx4
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx4
-rw-r--r--Source/cmMakefile.cxx10
-rw-r--r--Source/cmMakefile.h4
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx8
7 files changed, 21 insertions, 21 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 3e9b786..33e76cd 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -567,9 +567,9 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
{
// Add the file to the list of sources.
std::string source = (*sfIt)->GetFullPath();
- cmSourceGroup& sourceGroup =
+ cmSourceGroup* sourceGroup =
makefile->FindSourceGroup(source.c_str(), sourceGroups);
- sourceGroup.AssignSource(*sfIt);
+ sourceGroup->AssignSource(*sfIt);
}
for(std::vector<cmSourceGroup>::iterator sgIt = sourceGroups.begin();
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 41961ed..46c34d0 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2960,10 +2960,10 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
cmSourceFile* sf = *s;
// Add the file to the list of sources.
std::string const& source = sf->GetFullPath();
- cmSourceGroup& sourceGroup =
+ cmSourceGroup* sourceGroup =
mf->FindSourceGroup(source.c_str(), sourceGroups);
cmXCodeObject* pbxgroup =
- this->CreateOrGetPBXGroup(cmtarget, &sourceGroup);
+ this->CreateOrGetPBXGroup(cmtarget, sourceGroup);
cmStdString key = GetGroupMapKey(cmtarget, sf);
this->GroupMap[key] = pbxgroup;
}
@@ -2975,10 +2975,10 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
oi = objs.begin(); oi != objs.end(); ++oi)
{
std::string const& source = *oi;
- cmSourceGroup& sourceGroup =
+ cmSourceGroup* sourceGroup =
mf->FindSourceGroup(source.c_str(), sourceGroups);
cmXCodeObject* pbxgroup =
- this->CreateOrGetPBXGroup(cmtarget, &sourceGroup);
+ this->CreateOrGetPBXGroup(cmtarget, sourceGroup);
cmStdString key = GetGroupMapKeyFromPath(cmtarget, source);
this->GroupMap[key] = pbxgroup;
}
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index fb12521..a5e8294 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -324,9 +324,9 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
{
// Add the file to the list of sources.
std::string source = (*i)->GetFullPath();
- cmSourceGroup& sourceGroup =
+ cmSourceGroup* sourceGroup =
this->Makefile->FindSourceGroup(source.c_str(), sourceGroups);
- sourceGroup.AssignSource(*i);
+ sourceGroup->AssignSource(*i);
// while we are at it, if it is a .rule file then for visual studio 6 we
// must generate it
if ((*i)->GetPropertyAsBool("__CMAKE_RULE"))
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 57a4880..212b06b 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1392,9 +1392,9 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
{
this->ModuleDefinitionFile = (*i)->GetFullPath();
}
- cmSourceGroup& sourceGroup =
+ cmSourceGroup* sourceGroup =
this->Makefile->FindSourceGroup(source.c_str(), sourceGroups);
- sourceGroup.AssignSource(*i);
+ sourceGroup->AssignSource(*i);
}
// open the project
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ebc816e..fa8918e 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2775,9 +2775,9 @@ cmMakefile::GetConfigurations(std::vector<std::string>& configs,
* non-inherited SOURCE_GROUP commands will have precedence over
* inherited ones.
*/
-cmSourceGroup&
+cmSourceGroup*
cmMakefile::FindSourceGroup(const char* source,
- std::vector<cmSourceGroup> &groups)
+ std::vector<cmSourceGroup> &groups) const
{
// First search for a group that lists the file explicitly.
for(std::vector<cmSourceGroup>::reverse_iterator sg = groups.rbegin();
@@ -2786,7 +2786,7 @@ cmMakefile::FindSourceGroup(const char* source,
cmSourceGroup *result = sg->MatchChildrenFiles(source);
if(result)
{
- return *result;
+ return result;
}
}
@@ -2797,13 +2797,13 @@ cmMakefile::FindSourceGroup(const char* source,
cmSourceGroup *result = sg->MatchChildrenRegex(source);
if(result)
{
- return *result;
+ return result;
}
}
// Shouldn't get here, but just in case, return the default group.
- return groups.front();
+ return &groups.front();
}
#endif
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 3d4a08a..dac3dfb 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -706,8 +706,8 @@ public:
/**
* find what source group this source is in
*/
- cmSourceGroup& FindSourceGroup(const char* source,
- std::vector<cmSourceGroup> &groups);
+ cmSourceGroup* FindSourceGroup(const char* source,
+ std::vector<cmSourceGroup> &groups) const;
#endif
/**
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index eee7c14..ed7e243 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -708,9 +708,9 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
{
cmSourceFile* sf = *s;
std::string const& source = sf->GetFullPath();
- cmSourceGroup& sourceGroup =
+ cmSourceGroup* sourceGroup =
this->Makefile->FindSourceGroup(source.c_str(), sourceGroups);
- groupsUsed.insert(&sourceGroup);
+ groupsUsed.insert(sourceGroup);
}
this->AddMissingSourceGroups(groupsUsed, sourceGroups);
@@ -901,9 +901,9 @@ WriteGroupSources(const char* name,
{
cmSourceFile* sf = s->SourceFile;
std::string const& source = sf->GetFullPath();
- cmSourceGroup& sourceGroup =
+ cmSourceGroup* sourceGroup =
this->Makefile->FindSourceGroup(source.c_str(), sourceGroups);
- const char* filter = sourceGroup.GetFullName();
+ const char* filter = sourceGroup->GetFullName();
this->WriteString("<", 2);
std::string path = this->ConvertPath(source, s->RelativePath);
this->ConvertToWindowsSlash(path);