Commit ef25ba8d authored by Stephen Kelly's avatar Stephen Kelly
Browse files

Constify handling of target dependencies.

parent 97fae68b
......@@ -143,12 +143,13 @@ bool cmComputeTargetDepends::Compute()
//----------------------------------------------------------------------------
void
cmComputeTargetDepends::GetTargetDirectDepends(cmTarget* t,
cmComputeTargetDepends::GetTargetDirectDepends(cmTarget const* t,
cmTargetDependSet& deps)
{
// Lookup the index for this target. All targets should be known by
// this point.
std::map<cmTarget*, int>::const_iterator tii = this->TargetIndex.find(t);
std::map<cmTarget const*, int>::const_iterator tii
= this->TargetIndex.find(t);
assert(tii != this->TargetIndex.end());
int i = tii->second;
......@@ -156,7 +157,7 @@ cmComputeTargetDepends::GetTargetDirectDepends(cmTarget* t,
EdgeList const& nl = this->FinalGraph[i];
for(EdgeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
{
cmTarget* dep = this->Targets[*ni];
cmTarget const* dep = this->Targets[*ni];
cmTargetDependSet::iterator di = deps.insert(dep).first;
di->SetType(ni->IsStrong());
}
......@@ -170,10 +171,11 @@ void cmComputeTargetDepends::CollectTargets()
this->GlobalGenerator->GetLocalGenerators();
for(unsigned int i = 0; i < lgens.size(); ++i)
{
cmTargets& targets = lgens[i]->GetMakefile()->GetTargets();
for(cmTargets::iterator ti = targets.begin(); ti != targets.end(); ++ti)
const cmTargets& targets = lgens[i]->GetMakefile()->GetTargets();
for(cmTargets::const_iterator ti = targets.begin();
ti != targets.end(); ++ti)
{
cmTarget* target = &ti->second;
cmTarget const* target = &ti->second;
int index = static_cast<int>(this->Targets.size());
this->TargetIndex[target] = index;
this->Targets.push_back(target);
......@@ -198,7 +200,7 @@ void cmComputeTargetDepends::CollectDepends()
void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
{
// Get the depender.
cmTarget* depender = this->Targets[depender_index];
cmTarget const* depender = this->Targets[depender_index];
if (depender->GetType() == cmTarget::INTERFACE_LIBRARY)
{
return;
......@@ -271,11 +273,11 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
//----------------------------------------------------------------------------
void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
cmTarget* dependee,
cmTarget const* dependee,
const char *config,
std::set<cmStdString> &emitted)
{
cmTarget* depender = this->Targets[depender_index];
cmTarget const* depender = this->Targets[depender_index];
if(cmTarget::LinkInterface const* iface =
dependee->GetLinkInterface(config, depender))
{
......@@ -300,8 +302,8 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
bool linking,
std::set<cmStdString> &emitted)
{
cmTarget* depender = this->Targets[depender_index];
cmTarget* dependee =
cmTarget const* depender = this->Targets[depender_index];
cmTarget const* dependee =
depender->GetMakefile()->FindTargetToUse(dependee_name);
// Skip targets that will not really be linked. This is probably a
// name conflict between an external library and an executable
......@@ -335,10 +337,10 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
bool linking)
{
// Get the depender.
cmTarget* depender = this->Targets[depender_index];
cmTarget const* depender = this->Targets[depender_index];
// Check the target's makefile first.
cmTarget* dependee =
cmTarget const* dependee =
depender->GetMakefile()->FindTargetToUse(dependee_name);
// Skip targets that will not really be linked. This is probably a
......@@ -359,7 +361,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
//----------------------------------------------------------------------------
void cmComputeTargetDepends::AddTargetDepend(int depender_index,
cmTarget* dependee,
cmTarget const* dependee,
bool linking)
{
if(dependee->IsImported())
......@@ -369,7 +371,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
for(std::set<cmStdString>::const_iterator i = utils.begin();
i != utils.end(); ++i)
{
if(cmTarget* transitive_dependee =
if(cmTarget const* transitive_dependee =
dependee->GetMakefile()->FindTargetToUse(i->c_str()))
{
this->AddTargetDepend(depender_index, transitive_dependee, false);
......@@ -380,7 +382,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
{
// Lookup the index for this target. All targets should be known by
// this point.
std::map<cmTarget*, int>::const_iterator tii =
std::map<cmTarget const*, int>::const_iterator tii =
this->TargetIndex.find(dependee);
assert(tii != this->TargetIndex.end());
int dependee_index = tii->second;
......@@ -400,13 +402,13 @@ cmComputeTargetDepends::DisplayGraph(Graph const& graph, const char* name)
for(int depender_index = 0; depender_index < n; ++depender_index)
{
EdgeList const& nl = graph[depender_index];
cmTarget* depender = this->Targets[depender_index];
cmTarget const* depender = this->Targets[depender_index];
fprintf(stderr, "target %d is [%s]\n",
depender_index, depender->GetName());
for(EdgeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
{
int dependee_index = *ni;
cmTarget* dependee = this->Targets[dependee_index];
cmTarget const* dependee = this->Targets[dependee_index];
fprintf(stderr, " depends on target %d [%s] (%s)\n", dependee_index,
dependee->GetName(), ni->IsStrong()? "strong" : "weak");
}
......@@ -493,7 +495,7 @@ cmComputeTargetDepends
{
// Get the depender.
int i = *ci;
cmTarget* depender = this->Targets[i];
cmTarget const* depender = this->Targets[i];
// Describe the depender.
e << " \"" << depender->GetName() << "\" of type "
......@@ -506,7 +508,7 @@ cmComputeTargetDepends
int j = *ni;
if(cmap[j] == c)
{
cmTarget* dependee = this->Targets[j];
cmTarget const* dependee = this->Targets[j];
e << " depends on \"" << dependee->GetName() << "\""
<< " (" << (ni->IsStrong()? "strong" : "weak") << ")\n";
}
......
......@@ -38,19 +38,21 @@ public:
bool Compute();
std::vector<cmTarget*> const& GetTargets() const { return this->Targets; }
void GetTargetDirectDepends(cmTarget* t, cmTargetDependSet& deps);
std::vector<cmTarget const*> const&
GetTargets() const { return this->Targets; }
void GetTargetDirectDepends(cmTarget const* t, cmTargetDependSet& deps);
private:
void CollectTargets();
void CollectDepends();
void CollectTargetDepends(int depender_index);
void AddTargetDepend(int depender_index, const char* dependee_name,
bool linking);
void AddTargetDepend(int depender_index, cmTarget* dependee, bool linking);
void AddTargetDepend(int depender_index, cmTarget const* dependee,
bool linking);
bool ComputeFinalDepends(cmComputeComponentGraph const& ccg);
void AddInterfaceDepends(int depender_index, const char* dependee_name,
bool linking, std::set<cmStdString> &emitted);
void AddInterfaceDepends(int depender_index, cmTarget* dependee,
void AddInterfaceDepends(int depender_index, cmTarget const* dependee,
const char *config,
std::set<cmStdString> &emitted);
cmGlobalGenerator* GlobalGenerator;
......@@ -58,8 +60,8 @@ private:
bool NoCycles;
// Collect all targets.
std::vector<cmTarget*> Targets;
std::map<cmTarget*, int> TargetIndex;
std::vector<cmTarget const*> Targets;
std::map<cmTarget const*, int> TargetIndex;
// Represent the target dependency graph. The entry at each
// top-level index corresponds to a depender whose dependencies are
......
......@@ -950,7 +950,7 @@ void cmGlobalGenerator::ClearEnabledLanguages()
}
bool cmGlobalGenerator::IsDependedOn(const char* project,
cmTarget* targetIn)
cmTarget const* targetIn)
{
// Get all local gens for this project
std::vector<cmLocalGenerator*>* gens = &this->ProjectMap[project];
......@@ -1214,8 +1214,8 @@ bool cmGlobalGenerator::ComputeTargetDepends()
{
return false;
}
std::vector<cmTarget*> const& targets = ctd.GetTargets();
for(std::vector<cmTarget*>::const_iterator ti = targets.begin();
std::vector<cmTarget const*> const& targets = ctd.GetTargets();
for(std::vector<cmTarget const*>::const_iterator ti = targets.begin();
ti != targets.end(); ++ti)
{
ctd.GetTargetDirectDepends(*ti, this->TargetDependencies[*ti]);
......@@ -1954,7 +1954,7 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
clg = clg->GetParent())
{
// This local generator includes the target.
std::set<cmTarget*>& targetSet =
std::set<cmTarget const*>& targetSet =
this->LocalGeneratorToTargetMap[clg];
targetSet.insert(&target);
......@@ -1965,7 +1965,8 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
for(TargetDependSet::const_iterator ti = tgtdeps.begin();
ti != tgtdeps.end(); ++ti)
{
targetSet.insert(*ti);
cmTarget const* ttt = *ti;
targetSet.insert(ttt);
}
}
}
......@@ -2478,7 +2479,7 @@ void cmGlobalGenerator::AppendDirectoryForConfig(const char*, const char*,
//----------------------------------------------------------------------------
cmGlobalGenerator::TargetDependSet const&
cmGlobalGenerator::GetTargetDirectDepends(cmTarget & target)
cmGlobalGenerator::GetTargetDirectDepends(cmTarget const& target)
{
return this->TargetDependencies[&target];
}
......@@ -2600,7 +2601,7 @@ bool cmGlobalGenerator::IsRootOnlyTarget(cmTarget* target)
}
//----------------------------------------------------------------------------
void cmGlobalGenerator::AddTargetDepends(cmTarget* target,
void cmGlobalGenerator::AddTargetDepends(cmTarget const* target,
TargetDependSet& projectTargets)
{
// add the target itself
......@@ -2611,7 +2612,7 @@ void cmGlobalGenerator::AddTargetDepends(cmTarget* target,
TargetDependSet const& ts = this->GetTargetDirectDepends(*target);
for(TargetDependSet::const_iterator i = ts.begin(); i != ts.end(); ++i)
{
cmTarget* dtarget = *i;
cmTarget const* dtarget = *i;
this->AddTargetDepends(dtarget, projectTargets);
}
}
......
......@@ -218,7 +218,7 @@ public:
/** If check to see if the target is linked to by any other
target in the project */
bool IsDependedOn(const char* project, cmTarget* target);
bool IsDependedOn(const char* project, cmTarget const* target);
///! Find a local generator by its startdirectory
cmLocalGenerator* FindLocalGenerator(const char* start_dir);
......@@ -266,7 +266,7 @@ public:
// what targets does the specified target depend on directly
// via a target_link_libraries or add_dependencies
TargetDependSet const& GetTargetDirectDepends(cmTarget & target);
TargetDependSet const& GetTargetDirectDepends(cmTarget const& target);
/** Get per-target generator information. */
cmGeneratorTarget* GetGeneratorTarget(cmTarget*) const;
......@@ -323,7 +323,8 @@ protected:
TargetDependSet& originalTargets,
cmLocalGenerator* root, GeneratorVector const&);
virtual bool IsRootOnlyTarget(cmTarget* target);
void AddTargetDepends(cmTarget* target, TargetDependSet& projectTargets);
void AddTargetDepends(cmTarget const* target,
TargetDependSet& projectTargets);
void SetLanguageEnabledFlag(const char* l, cmMakefile* mf);
void SetLanguageEnabledMaps(const char* l, cmMakefile* mf);
void FillExtensionToLanguageMap(const char* l, cmMakefile* mf);
......@@ -362,7 +363,8 @@ protected:
cmLocalGenerator* CurrentLocalGenerator;
// map from project name to vector of local generators in that project
std::map<cmStdString, std::vector<cmLocalGenerator*> > ProjectMap;
std::map<cmLocalGenerator*, std::set<cmTarget *> > LocalGeneratorToTargetMap;
std::map<cmLocalGenerator*, std::set<cmTarget const*> >
LocalGeneratorToTargetMap;
// Set of named installation components requested by the project.
std::set<cmStdString> InstallComponents;
......@@ -420,7 +422,7 @@ private:
std::vector<std::string> FilesReplacedDuringGenerate;
// Store computed inter-target dependencies.
typedef std::map<cmTarget *, TargetDependSet> TargetDependMap;
typedef std::map<cmTarget const*, TargetDependSet> TargetDependMap;
TargetDependMap TargetDependencies;
// Per-target generator information.
......
......@@ -830,7 +830,7 @@ void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies()
void
cmGlobalNinjaGenerator
::AppendTargetOutputs(cmTarget* target, cmNinjaDeps& outputs)
::AppendTargetOutputs(cmTarget const* target, cmNinjaDeps& outputs)
{
const char* configName =
target->GetMakefile()->GetDefinition("CMAKE_BUILD_TYPE");
......@@ -879,7 +879,7 @@ cmGlobalNinjaGenerator
void
cmGlobalNinjaGenerator
::AppendTargetDepends(cmTarget* target, cmNinjaDeps& outputs)
::AppendTargetDepends(cmTarget const* target, cmNinjaDeps& outputs)
{
if (target->GetType() == cmTarget::GLOBAL_TARGET) {
// Global targets only depend on other utilities, which may not appear in
......
......@@ -283,8 +283,8 @@ public:
ASD.insert(deps.begin(), deps.end());
}
void AppendTargetOutputs(cmTarget* target, cmNinjaDeps& outputs);
void AppendTargetDepends(cmTarget* target, cmNinjaDeps& outputs);
void AppendTargetOutputs(cmTarget const* target, cmNinjaDeps& outputs);
void AppendTargetDepends(cmTarget const* target, cmNinjaDeps& outputs);
void AddDependencyToAll(cmTarget* target);
void AddDependencyToAll(const std::string& input);
......
......@@ -841,7 +841,7 @@ cmGlobalUnixMakefileGenerator3
cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
//
std::set<cmTarget *> emitted;
std::set<cmTarget const*> emitted;
progCmd << " "
<< this->CountProgressMarksInTarget(t->second->Target, emitted);
commands.push_back(progCmd.str());
......@@ -919,8 +919,8 @@ cmGlobalUnixMakefileGenerator3
//----------------------------------------------------------------------------
size_t
cmGlobalUnixMakefileGenerator3
::CountProgressMarksInTarget(cmTarget* target,
std::set<cmTarget*>& emitted)
::CountProgressMarksInTarget(cmTarget const* target,
std::set<cmTarget const*>& emitted)
{
size_t count = 0;
if(emitted.insert(target).second)
......@@ -946,9 +946,10 @@ cmGlobalUnixMakefileGenerator3
::CountProgressMarksInAll(cmLocalUnixMakefileGenerator3* lg)
{
size_t count = 0;
std::set<cmTarget*> emitted;
std::set<cmTarget*> const& targets = this->LocalGeneratorToTargetMap[lg];
for(std::set<cmTarget*>::const_iterator t = targets.begin();
std::set<cmTarget const*> emitted;
std::set<cmTarget const*> const& targets
= this->LocalGeneratorToTargetMap[lg];
for(std::set<cmTarget const*>::const_iterator t = targets.begin();
t != targets.end(); ++t)
{
count += this->CountProgressMarksInTarget(*t, emitted);
......@@ -969,7 +970,7 @@ cmGlobalUnixMakefileGenerator3::RecordTargetProgress(
//----------------------------------------------------------------------------
bool
cmGlobalUnixMakefileGenerator3::ProgressMapCompare
::operator()(cmTarget* l, cmTarget* r) const
::operator()(cmTarget const* l, cmTarget const* r) const
{
// Order by target name.
if(int c = strcmp(l->GetName(), r->GetName()))
......
......@@ -181,13 +181,14 @@ protected:
std::vector<unsigned long> Marks;
void WriteProgressVariables(unsigned long total, unsigned long& current);
};
struct ProgressMapCompare { bool operator()(cmTarget*,cmTarget*) const; };
typedef std::map<cmTarget*, TargetProgress,
struct ProgressMapCompare { bool operator()(cmTarget const*,
cmTarget const*) const; };
typedef std::map<cmTarget const*, TargetProgress,
ProgressMapCompare> ProgressMapType;
ProgressMapType ProgressMap;
size_t CountProgressMarksInTarget(cmTarget* target,
std::set<cmTarget*>& emitted);
size_t CountProgressMarksInTarget(cmTarget const* target,
std::set<cmTarget const*>& emitted);
size_t CountProgressMarksInAll(cmLocalUnixMakefileGenerator3* lg);
cmGeneratedFileStream *CommandDatabase;
......
......@@ -205,7 +205,7 @@ void cmGlobalVisualStudio6Generator
tt = orderedProjectTargets.begin();
tt != orderedProjectTargets.end(); ++tt)
{
cmTarget* target = *tt;
cmTarget const* target = *tt;
if(target->GetType() == cmTarget::INTERFACE_LIBRARY)
{
continue;
......@@ -271,7 +271,7 @@ void cmGlobalVisualStudio6Generator::OutputDSWFile()
void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
const char* dspname,
const char* dir,
cmTarget& target)
cmTarget const& target)
{
fout << "#########################################################"
"######################\n\n";
......@@ -364,7 +364,7 @@ void cmGlobalVisualStudio6Generator::WriteDSWHeader(std::ostream& fout)
//----------------------------------------------------------------------------
std::string
cmGlobalVisualStudio6Generator::WriteUtilityDepend(cmTarget* target)
cmGlobalVisualStudio6Generator::WriteUtilityDepend(cmTarget const* target)
{
std::string pname = target->GetName();
pname += "_UTILITY";
......
......@@ -99,12 +99,12 @@ private:
void WriteDSWFile(std::ostream& fout);
void WriteDSWHeader(std::ostream& fout);
void WriteProject(std::ostream& fout,
const char* name, const char* path, cmTarget &t);
const char* name, const char* path, cmTarget const& t);
void WriteExternalProject(std::ostream& fout,
const char* name, const char* path,
const std::set<cmStdString>& dependencies);
void WriteDSWFooter(std::ostream& fout);
virtual std::string WriteUtilityDepend(cmTarget* target);
virtual std::string WriteUtilityDepend(cmTarget const* target);
std::string MSDevCommand;
bool MSDevCommandInitialized;
std::string const& GetMSDevCommand();
......
......@@ -157,7 +157,7 @@ void
cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
const char* dspname,
const char* dir,
cmTarget& t)
cmTarget const& t)
{
// check to see if this is a fortran build
const char* ext = ".vcproj";
......@@ -209,7 +209,7 @@ void
cmGlobalVisualStudio71Generator
::WriteProjectDepends(std::ostream& fout,
const char*,
const char*, cmTarget& target)
const char*, cmTarget const& target)
{
VSDependSet const& depends = this->VSTargetDepends[&target];
for(VSDependSet::const_iterator di = depends.begin();
......
......@@ -59,9 +59,11 @@ protected:
std::vector<cmLocalGenerator*>& generators);
virtual void WriteSolutionConfigurations(std::ostream& fout);
virtual void WriteProject(std::ostream& fout,
const char* name, const char* path, cmTarget &t);
const char* name, const char* path,
cmTarget const& t);
virtual void WriteProjectDepends(std::ostream& fout,
const char* name, const char* path, cmTarget &t);
const char* name, const char* path,
cmTarget const& t);
virtual void WriteProjectConfigurations(
std::ostream& fout, const char* name, cmTarget::TargetType type,
const std::set<std::string>& configsPartOfDefaultBuild,
......
......@@ -335,7 +335,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
for(OrderedTargetDependSet::const_iterator tt =
projectTargets.begin(); tt != projectTargets.end(); ++tt)
{
cmTarget* target = *tt;
cmTarget const* target = *tt;
if(target->GetType() == cmTarget::INTERFACE_LIBRARY)
{
continue;
......@@ -376,7 +376,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
for(OrderedTargetDependSet::const_iterator tt =
projectTargets.begin(); tt != projectTargets.end(); ++tt)
{
cmTarget* target = *tt;
cmTarget const* target = *tt;
if(target->GetType() == cmTarget::INTERFACE_LIBRARY)
{
continue;
......@@ -470,7 +470,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetDepends(
for(OrderedTargetDependSet::const_iterator tt =
projectTargets.begin(); tt != projectTargets.end(); ++tt)
{
cmTarget* target = *tt;
cmTarget const* target = *tt;
if(target->GetType() == cmTarget::INTERFACE_LIBRARY)
{
continue;
......@@ -619,7 +619,7 @@ cmGlobalVisualStudio7Generator::ConvertToSolutionPath(const char* path)
// the libraries it uses are also done here
void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
const char* dspname,
const char* dir, cmTarget& target)
const char* dir, cmTarget const& target)
{
// check to see if this is a fortran build
const char* ext = ".vcproj";
......@@ -659,7 +659,7 @@ void
cmGlobalVisualStudio7Generator
::WriteProjectDepends(std::ostream& fout,
const char* dspname,
const char*, cmTarget& target)
const char*, cmTarget const& target)
{
int depcount = 0;
std::string dspguid = this->GetGUID(dspname);
......@@ -819,7 +819,7 @@ void cmGlobalVisualStudio7Generator::WriteSLNHeader(std::ostream& fout)
//----------------------------------------------------------------------------
std::string
cmGlobalVisualStudio7Generator::WriteUtilityDepend(cmTarget* target)
cmGlobalVisualStudio7Generator::WriteUtilityDepend(cmTarget const* target)
{
std::string pname = target->GetName();
pname += "_UTILITY";
......@@ -940,7 +940,7 @@ cmGlobalVisualStudio7Generator
std::set<std::string>
cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project,
cmTarget* target)
cmTarget const* target)
{
std::set<std::string> activeConfigs;
// if it is a utilitiy target then only make it part of the
......
......@@ -121,9 +121,11 @@ protected:
virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators);
virtual void WriteProject(std::ostream& fout,
const char* name, const char* path, cmTarget &t);
const char* name, const char* path,
cmTarget const& t);
virtual void WriteProjectDepends(std::ostream& fout,
const char* name, const char* path, cmTarget &t);
const char* name, const char* path,
cmTarget const&t);
virtual void WriteProjectConfigurations(
std::ostream& fout, const char* name, cmTarget::TargetType type,
const std::set<std::string>& configsPartOfDefaultBuild,
......@@ -132,7 +134,7 @@ protected:
cmLocalGenerator* root);
virtual void WriteSLNFooter(std::ostream& fout);
virtual void WriteSLNHeader(std::ostream& fout);
virtual std::string WriteUtilityDepend(cmTarget* target);
virtual std::string WriteUtilityDepend(cmTarget const* target);
virtual void WriteTargetsToSolution(
std::ostream& fout,
......@@ -158,7 +160,7 @@ protected:
std::string ConvertToSolutionPath(const char* path);
std::set<std::string> IsPartOfDefaultBuild(const char* project,
cmTarget* target);
cmTarget const* target);
std::vector<std::string> Configurations;
std::map<cmStdString, cmStdString> GUIDMap;
......
......@@ -415,7 +415,7 @@ bool cmGlobalVisualStudio8Generator::ComputeTargetDepends()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio8Generator::WriteProjectDepends(
std::ostream& fout, const char*, const char*, cmTarget& t)
std::ostream& fout, const char*, const char*, cmTarget const& t)
{
TargetDependSet const& unordered = this->GetTargetDirectDepends(t);
OrderedTargetDependSet depends(unordered);
......
......@@ -84,7 +84,7 @@ protected:
const char* platformMapping = NULL);
virtual bool ComputeTargetDepends();
virtual void WriteProjectDepends(std::ostream& fout, const char* name,
const char* path, cmTarget &t);
const char* path, cmTarget const& t);
std::string Name;
std::string WindowsCEVersion;
......
......@@ -315,7 +315,7 @@ std::string cmGlobalVisualStudioGenerator::GetUserMacrosRegKeyBase()
}
//----------------------------------------------------------------------------
void cmGlobalVisualStudioGenerator::FillLinkClosure(cmTarget* target,
void cmGlobalVisualStudioGenerator::FillLinkClosure(cmTarget const* target,
TargetSet& linked)
{
if(linked.insert(target).second)
......@@ -348,7 +348,7 @@ cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmTarget* target)
//----------------------------------------------------------------------------
void cmGlobalVisualStudioGenerator::FollowLinkDepends(
cmTarget* target, std::set<cmTarget*>& linked)
cmTarget const* target, std::set<cmTarget const*>& linked)
{
if(target->GetType() == cmTarget::INTERFACE_LIBRARY)
{
......@@ -397,7 +397,7 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends()
}
//----------------------------------------------------------------------------
static bool VSLinkable(cmTarget* t)
static bool VSLinkable(cmTarget const* t)