summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-12 22:06:05 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-13 14:27:23 (GMT)
commit9ad804ac7be18efb92040434808f89174586b13d (patch)
treef439c944534f4ad1e01a5ec7810369b67b36de81
parentc725bb3cbd51edd4043f81d01b7a01bbd42adb2f (diff)
downloadCMake-9ad804ac7be18efb92040434808f89174586b13d.zip
CMake-9ad804ac7be18efb92040434808f89174586b13d.tar.gz
CMake-9ad804ac7be18efb92040434808f89174586b13d.tar.bz2
cmGeneratorTarget: Constify cmSourceFile* in containers.
Some of them will be used with other APIs which require value_type to be cmSourceFile const*.
-rw-r--r--Source/cmGeneratorTarget.cxx27
-rw-r--r--Source/cmGeneratorTarget.h18
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx6
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx6
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx10
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx6
-rw-r--r--Source/cmMakefileTargetGenerator.cxx16
-rw-r--r--Source/cmNinjaTargetGenerator.cxx20
-rw-r--r--Source/cmOSXBundleGenerator.cxx7
-rw-r--r--Source/cmOSXBundleGenerator.h2
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx32
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h3
13 files changed, 84 insertions, 75 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index bde60b8..8efd7bb 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -97,7 +97,7 @@ struct DoAccept
template<>
struct DoAccept<true>
{
- static void Do(std::vector<cmSourceFile*>& files, cmSourceFile* f)
+ static void Do(std::vector<cmSourceFile const*>& files, cmSourceFile* f)
{
files.push_back(f);
}
@@ -120,7 +120,7 @@ struct DoAccept<true>
};
//----------------------------------------------------------------------------
-template<typename Tag, typename DataType = std::vector<cmSourceFile*> >
+template<typename Tag, typename DataType = std::vector<cmSourceFile const*> >
struct TagVisitor
{
DataType& Data;
@@ -306,7 +306,8 @@ static void handleSystemIncludesDep(cmMakefile *mf, cmTarget* depTgt,
//----------------------------------------------------------------------------
void
-cmGeneratorTarget::GetObjectSources(std::vector<cmSourceFile*> &data) const
+cmGeneratorTarget
+::GetObjectSources(std::vector<cmSourceFile const*> &data) const
{
IMPLEMENT_VISIT(ObjectSources);
if (this->Target->GetType() == cmTarget::OBJECT_LIBRARY)
@@ -342,34 +343,39 @@ bool cmGeneratorTarget::HasExplicitObjectName(cmSourceFile const* file) const
}
//----------------------------------------------------------------------------
-void cmGeneratorTarget::GetIDLSources(std::vector<cmSourceFile*>& data) const
+void cmGeneratorTarget
+::GetIDLSources(std::vector<cmSourceFile const*>& data) const
{
IMPLEMENT_VISIT(IDLSources);
}
//----------------------------------------------------------------------------
void
-cmGeneratorTarget::GetHeaderSources(std::vector<cmSourceFile*>& data) const
+cmGeneratorTarget
+::GetHeaderSources(std::vector<cmSourceFile const*>& data) const
{
IMPLEMENT_VISIT(HeaderSources);
}
//----------------------------------------------------------------------------
-void cmGeneratorTarget::GetExtraSources(std::vector<cmSourceFile*>& data) const
+void cmGeneratorTarget
+::GetExtraSources(std::vector<cmSourceFile const*>& data) const
{
IMPLEMENT_VISIT(ExtraSources);
}
//----------------------------------------------------------------------------
void
-cmGeneratorTarget::GetCustomCommands(std::vector<cmSourceFile*>& data) const
+cmGeneratorTarget
+::GetCustomCommands(std::vector<cmSourceFile const*>& data) const
{
IMPLEMENT_VISIT(CustomCommands);
}
//----------------------------------------------------------------------------
void
-cmGeneratorTarget::GetExternalObjects(std::vector<cmSourceFile*>& data) const
+cmGeneratorTarget
+::GetExternalObjects(std::vector<cmSourceFile const*>& data) const
{
IMPLEMENT_VISIT(ExternalObjects);
}
@@ -384,7 +390,8 @@ cmGeneratorTarget::GetExpectedResxHeaders(std::set<std::string>& srcs) const
}
//----------------------------------------------------------------------------
-void cmGeneratorTarget::GetResxSources(std::vector<cmSourceFile*>& srcs) const
+void cmGeneratorTarget
+::GetResxSources(std::vector<cmSourceFile const*>& srcs) const
{
ResxData data;
IMPLEMENT_VISIT_IMPL(Resx, COMMA cmGeneratorTarget::ResxData)
@@ -570,7 +577,7 @@ cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs) const
cmTarget* objLib = *ti;
cmGeneratorTarget* ogt =
this->GlobalGenerator->GetGeneratorTarget(objLib);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = ogt->ObjectSources.begin();
si != ogt->ObjectSources.end(); ++si)
{
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 1c4276c..139e736 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -32,19 +32,19 @@ public:
bool GetPropertyAsBool(const std::string& prop) const;
void GetSourceFiles(std::vector<cmSourceFile*>& files) const;
- void GetObjectSources(std::vector<cmSourceFile*> &) const;
+ void GetObjectSources(std::vector<cmSourceFile const*> &) const;
const std::string& GetObjectName(cmSourceFile const* file);
void AddObject(cmSourceFile const* sf, std::string const&name);
bool HasExplicitObjectName(cmSourceFile const* file) const;
void AddExplicitObjectName(cmSourceFile const* sf);
- void GetResxSources(std::vector<cmSourceFile*>&) const;
- void GetIDLSources(std::vector<cmSourceFile*>&) const;
- void GetExternalObjects(std::vector<cmSourceFile*>&) const;
- void GetHeaderSources(std::vector<cmSourceFile*>&) const;
- void GetExtraSources(std::vector<cmSourceFile*>&) const;
- void GetCustomCommands(std::vector<cmSourceFile*>&) const;
+ void GetResxSources(std::vector<cmSourceFile const*>&) const;
+ void GetIDLSources(std::vector<cmSourceFile const*>&) const;
+ void GetExternalObjects(std::vector<cmSourceFile const*>&) const;
+ void GetHeaderSources(std::vector<cmSourceFile const*>&) const;
+ void GetExtraSources(std::vector<cmSourceFile const*>&) const;
+ void GetCustomCommands(std::vector<cmSourceFile const*>&) const;
void GetExpectedResxHeaders(std::set<std::string>&) const;
cmTarget* Target;
@@ -117,7 +117,7 @@ public:
struct ResxData {
mutable std::set<std::string> ExpectedResxHeaders;
- mutable std::vector<cmSourceFile*> ResxSources;
+ mutable std::vector<cmSourceFile const*> ResxSources;
};
private:
friend class cmTargetTraceDependencies;
@@ -127,7 +127,7 @@ private:
std::map<cmSourceFile const*, std::string> Objects;
std::set<cmSourceFile const*> ExplicitObjectName;
- mutable std::vector<cmSourceFile*> ObjectSources;
+ mutable std::vector<cmSourceFile const*> ObjectSources;
std::vector<cmTarget*> ObjectLibraries;
mutable std::map<std::string, std::vector<std::string> > SystemIncludesCache;
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 686414d..e9c31e9 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -634,14 +634,14 @@ std::string cmGlobalNinjaGenerator::GetEditCacheCommand() const
// TODO: Refactor to combine with cmGlobalUnixMakefileGenerator3 impl.
void cmGlobalNinjaGenerator::ComputeTargetObjects(cmGeneratorTarget* gt) const
{
- std::vector<cmSourceFile*> objectSources;
+ std::vector<cmSourceFile const*> objectSources;
gt->GetObjectSources(objectSources);
// Compute the name of each object file.
- for(std::vector<cmSourceFile*>::iterator
+ for(std::vector<cmSourceFile const*>::iterator
si = objectSources.begin();
si != objectSources.end(); ++si)
{
- cmSourceFile* sf = *si;
+ cmSourceFile const* sf = *si;
std::string objectName = gt->LocalGenerator
->GetObjectFileNameWithoutTarget(*sf, gt->ObjectDirectory);
gt->AddObject(sf, objectName);
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index f9ec0a9..6ce8678 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -108,14 +108,14 @@ void
cmGlobalUnixMakefileGenerator3
::ComputeTargetObjects(cmGeneratorTarget* gt) const
{
- std::vector<cmSourceFile*> objectSources;
+ std::vector<cmSourceFile const*> objectSources;
gt->GetObjectSources(objectSources);
// Compute the name of each object file.
- for(std::vector<cmSourceFile*>::iterator
+ for(std::vector<cmSourceFile const*>::iterator
si = objectSources.begin();
si != objectSources.end(); ++si)
{
- cmSourceFile* sf = *si;
+ cmSourceFile const* sf = *si;
std::string objectName = gt->LocalGenerator
->GetObjectFileNameWithoutTarget(*sf, gt->ObjectDirectory);
gt->AddObject(sf, objectName);
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index f3cba5a..bd57d0c 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -129,13 +129,13 @@ cmGlobalVisualStudioGenerator
// Count the number of object files with each name. Note that
// windows file names are not case sensitive.
std::map<std::string, int> counts;
- std::vector<cmSourceFile*> objectSources;
+ std::vector<cmSourceFile const*> objectSources;
gt->GetObjectSources(objectSources);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = objectSources.begin();
si != objectSources.end(); ++si)
{
- cmSourceFile* sf = *si;
+ cmSourceFile const* sf = *si;
std::string objectNameLower = cmSystemTools::LowerCase(
cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath()));
objectNameLower += ".obj";
@@ -144,11 +144,11 @@ cmGlobalVisualStudioGenerator
// For all source files producing duplicate names we need unique
// object name computation.
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = objectSources.begin();
si != objectSources.end(); ++si)
{
- cmSourceFile* sf = *si;
+ cmSourceFile const* sf = *si;
std::string objectName =
cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath());
objectName += ".obj";
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 6c12040..4904d51 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3944,13 +3944,13 @@ cmGlobalXCodeGenerator
// to avoid exact duplicate file names. Note that Mac file names are not
// typically case sensitive, hence the LowerCase.
std::map<std::string, int> counts;
- std::vector<cmSourceFile*> objectSources;
+ std::vector<cmSourceFile const*> objectSources;
gt->GetObjectSources(objectSources);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = objectSources.begin();
si != objectSources.end(); ++si)
{
- cmSourceFile* sf = *si;
+ cmSourceFile const* sf = *si;
std::string objectName =
cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath());
objectName += ".o";
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index a838ce3..79240e1 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -185,7 +185,7 @@ GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
{
continue;
}
- std::vector<cmSourceFile*> objectSources;
+ std::vector<cmSourceFile const*> objectSources;
gt->GetObjectSources(objectSources);
// Compute full path to object file directory for this target.
std::string dir_max;
@@ -194,11 +194,11 @@ GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
dir_max += this->GetTargetDirectory(*gt->Target);
dir_max += "/";
// Compute the name of each object file.
- for(std::vector<cmSourceFile*>::iterator
+ for(std::vector<cmSourceFile const*>::iterator
si = objectSources.begin();
si != objectSources.end(); ++si)
{
- cmSourceFile* sf = *si;
+ cmSourceFile const* sf = *si;
bool hasSourceExtension = true;
std::string objectName = this->GetObjectFileNameWithoutTarget(*sf,
dir_max,
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 32e1c1a..6759d05 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -153,9 +153,9 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
// First generate the object rule files. Save a list of all object
// files for this target.
- std::vector<cmSourceFile*> customCommands;
+ std::vector<cmSourceFile const*> customCommands;
this->GeneratorTarget->GetCustomCommands(customCommands);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = customCommands.begin();
si != customCommands.end(); ++si)
{
@@ -176,27 +176,27 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
}
}
}
- std::vector<cmSourceFile*> headerSources;
+ std::vector<cmSourceFile const*> headerSources;
this->GeneratorTarget->GetHeaderSources(headerSources);
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
headerSources,
this->MacOSXContentGenerator);
- std::vector<cmSourceFile*> extraSources;
+ std::vector<cmSourceFile const*> extraSources;
this->GeneratorTarget->GetExtraSources(extraSources);
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
extraSources,
this->MacOSXContentGenerator);
- std::vector<cmSourceFile*> externalObjects;
+ std::vector<cmSourceFile const*> externalObjects;
this->GeneratorTarget->GetExternalObjects(externalObjects);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = externalObjects.begin();
si != externalObjects.end(); ++si)
{
this->ExternalObjects.push_back((*si)->GetFullPath());
}
- std::vector<cmSourceFile*> objectSources;
+ std::vector<cmSourceFile const*> objectSources;
this->GeneratorTarget->GetObjectSources(objectSources);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = objectSources.begin(); si != objectSources.end(); ++si)
{
// Generate this object file's rule file.
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 3738ca7..4319f3c 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -480,36 +480,36 @@ cmNinjaTargetGenerator
<< this->GetTargetName()
<< "\n\n";
- std::vector<cmSourceFile*> customCommands;
+ std::vector<cmSourceFile const*> customCommands;
this->GeneratorTarget->GetCustomCommands(customCommands);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = customCommands.begin();
si != customCommands.end(); ++si)
{
cmCustomCommand const* cc = (*si)->GetCustomCommand();
this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget());
}
- std::vector<cmSourceFile*> headerSources;
+ std::vector<cmSourceFile const*> headerSources;
this->GeneratorTarget->GetHeaderSources(headerSources);
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
headerSources,
this->MacOSXContentGenerator);
- std::vector<cmSourceFile*> extraSources;
+ std::vector<cmSourceFile const*> extraSources;
this->GeneratorTarget->GetExtraSources(extraSources);
this->OSXBundleGenerator->GenerateMacOSXContentStatements(
extraSources,
this->MacOSXContentGenerator);
- std::vector<cmSourceFile*> externalObjects;
+ std::vector<cmSourceFile const*> externalObjects;
this->GeneratorTarget->GetExternalObjects(externalObjects);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = externalObjects.begin();
si != externalObjects.end(); ++si)
{
this->Objects.push_back(this->GetSourceFilePath(*si));
}
- std::vector<cmSourceFile*> objectSources;
+ std::vector<cmSourceFile const*> objectSources;
this->GeneratorTarget->GetObjectSources(objectSources);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = objectSources.begin(); si != objectSources.end(); ++si)
{
this->WriteObjectBuildStatement(*si);
@@ -570,9 +570,9 @@ cmNinjaTargetGenerator
}
// Add order-only dependencies on custom command outputs.
- std::vector<cmSourceFile*> customCommands;
+ std::vector<cmSourceFile const*> customCommands;
this->GeneratorTarget->GetCustomCommands(customCommands);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = customCommands.begin();
si != customCommands.end(); ++si)
{
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index 835f892..6f16913 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -190,13 +190,14 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName,
//----------------------------------------------------------------------------
void
cmOSXBundleGenerator::
-GenerateMacOSXContentStatements(std::vector<cmSourceFile*> const& sources,
- MacOSXContentGeneratorType* generator)
+GenerateMacOSXContentStatements(
+ std::vector<cmSourceFile const*> const& sources,
+ MacOSXContentGeneratorType* generator)
{
if (this->MustSkip())
return;
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = sources.begin(); si != sources.end(); ++si)
{
cmGeneratorTarget::SourceFileFlags tsFlags =
diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h
index 5acdd9f..f945c15 100644
--- a/Source/cmOSXBundleGenerator.h
+++ b/Source/cmOSXBundleGenerator.h
@@ -49,7 +49,7 @@ public:
};
void GenerateMacOSXContentStatements(
- std::vector<cmSourceFile*> const& sources,
+ std::vector<cmSourceFile const*> const& sources,
MacOSXContentGeneratorType* generator);
std::string InitMacOSXContentDirectory(const char* pkgloc);
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index cc1fdbc..b8631ca 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -377,12 +377,12 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReferences()
void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup()
{
- std::vector<cmSourceFile*> resxObjs;
+ std::vector<cmSourceFile const*> resxObjs;
this->GeneratorTarget->GetResxSources(resxObjs);
if(!resxObjs.empty())
{
this->WriteString("<ItemGroup>\n", 1);
- for(std::vector<cmSourceFile*>::const_iterator oi = resxObjs.begin();
+ for(std::vector<cmSourceFile const*>::const_iterator oi = resxObjs.begin();
oi != resxObjs.end(); ++oi)
{
std::string obj = (*oi)->GetFullPath();
@@ -551,9 +551,9 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
void cmVisualStudio10TargetGenerator::WriteCustomCommands()
{
this->SourcesVisited.clear();
- std::vector<cmSourceFile*> customCommands;
+ std::vector<cmSourceFile const*> customCommands;
this->GeneratorTarget->GetCustomCommands(customCommands);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = customCommands.begin();
si != customCommands.end(); ++si)
{
@@ -746,12 +746,12 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
this->WriteGroupSources(ti->first.c_str(), ti->second, sourceGroups);
}
- std::vector<cmSourceFile*> resxObjs;
+ std::vector<cmSourceFile const*> resxObjs;
this->GeneratorTarget->GetResxSources(resxObjs);
if(!resxObjs.empty())
{
this->WriteString("<ItemGroup>\n", 1);
- for(std::vector<cmSourceFile*>::const_iterator oi = resxObjs.begin();
+ for(std::vector<cmSourceFile const*>::const_iterator oi = resxObjs.begin();
oi != resxObjs.end(); ++oi)
{
std::string obj = (*oi)->GetFullPath();
@@ -902,7 +902,7 @@ WriteGroupSources(const char* name,
for(ToolSources::const_iterator s = sources.begin();
s != sources.end(); ++s)
{
- cmSourceFile* sf = s->SourceFile;
+ cmSourceFile const* sf = s->SourceFile;
std::string const& source = sf->GetFullPath();
cmSourceGroup* sourceGroup =
this->Makefile->FindSourceGroup(source.c_str(), sourceGroups);
@@ -985,9 +985,9 @@ void cmVisualStudio10TargetGenerator::WriteSource(
}
void cmVisualStudio10TargetGenerator::WriteSources(
- const char* tool, std::vector<cmSourceFile*> const& sources)
+ const char* tool, std::vector<cmSourceFile const*> const& sources)
{
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = sources.begin(); si != sources.end(); ++si)
{
this->WriteSource(tool, *si);
@@ -1002,16 +1002,16 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
}
this->WriteString("<ItemGroup>\n", 1);
- std::vector<cmSourceFile*> headerSources;
+ std::vector<cmSourceFile const*> headerSources;
this->GeneratorTarget->GetHeaderSources(headerSources);
this->WriteSources("ClInclude", headerSources);
- std::vector<cmSourceFile*> idlSources;
+ std::vector<cmSourceFile const*> idlSources;
this->GeneratorTarget->GetIDLSources(idlSources);
this->WriteSources("Midl", idlSources);
- std::vector<cmSourceFile*> objectSources;
+ std::vector<cmSourceFile const*> objectSources;
this->GeneratorTarget->GetObjectSources(objectSources);
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = objectSources.begin();
si != objectSources.end(); ++si)
{
@@ -1050,7 +1050,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
}
}
- std::vector<cmSourceFile*> externalObjects;
+ std::vector<cmSourceFile const*> externalObjects;
this->GeneratorTarget->GetExternalObjects(externalObjects);
if(this->LocalGenerator->GetVersion() > cmLocalVisualStudioGenerator::VS10)
{
@@ -1062,7 +1062,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
{
// If an object file is generated in this target, then vs10 will use
// it in the build, and we have to list it as None instead of Object.
- for(std::vector<cmSourceFile*>::const_iterator
+ for(std::vector<cmSourceFile const*>::const_iterator
si = externalObjects.begin();
si != externalObjects.end(); ++si)
{
@@ -1072,7 +1072,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
}
}
- std::vector<cmSourceFile*> extraSources;
+ std::vector<cmSourceFile const*> extraSources;
this->GeneratorTarget->GetExtraSources(extraSources);
this->WriteSources("None", extraSources);
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 8faeb8e..d72c6fd 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -57,7 +57,8 @@ private:
void WriteProjectConfigurationValues();
void WriteSource(const char* tool, cmSourceFile const* sf,
const char* end = 0);
- void WriteSources(const char* tool, std::vector<cmSourceFile*> const&);
+ void WriteSources(const char* tool,
+ std::vector<cmSourceFile const*> const&);
void WriteAllSources();
void WriteDotNetReferences();
void WriteEmbeddedResourceGroup();