cmGeneratorTarget: Make some accessors const.
This commit is contained in:
parent
6bdea066e6
commit
af4c1096f6
|
@ -42,16 +42,16 @@ const char *cmGeneratorTarget::GetName() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char *cmGeneratorTarget::GetProperty(const char *prop)
|
||||
const char *cmGeneratorTarget::GetProperty(const char *prop) const
|
||||
{
|
||||
return this->Target->GetProperty(prop);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::vector<cmSourceFile*> const*
|
||||
cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf)
|
||||
cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf) const
|
||||
{
|
||||
SourceEntriesType::iterator i = this->SourceEntries.find(sf);
|
||||
SourceEntriesType::const_iterator i = this->SourceEntries.find(sf);
|
||||
if(i != this->SourceEntries.end())
|
||||
{
|
||||
return &i->second.Depends;
|
||||
|
@ -61,7 +61,7 @@ cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf)
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
|
||||
const char *config)
|
||||
const char *config) const
|
||||
{
|
||||
std::string config_upper;
|
||||
if(config && *config)
|
||||
|
@ -70,7 +70,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
|
|||
}
|
||||
|
||||
typedef std::map<std::string, std::vector<std::string> > IncludeCacheType;
|
||||
IncludeCacheType::iterator iter =
|
||||
IncludeCacheType::const_iterator iter =
|
||||
this->SystemIncludesCache.find(config_upper);
|
||||
|
||||
if (iter == this->SystemIncludesCache.end())
|
||||
|
@ -111,13 +111,13 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmGeneratorTarget::GetPropertyAsBool(const char *prop)
|
||||
bool cmGeneratorTarget::GetPropertyAsBool(const char *prop) const
|
||||
{
|
||||
return this->Target->GetPropertyAsBool(prop);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::vector<cmSourceFile*> const& cmGeneratorTarget::GetSourceFiles()
|
||||
std::vector<cmSourceFile*> const& cmGeneratorTarget::GetSourceFiles() const
|
||||
{
|
||||
return this->Target->GetSourceFiles();
|
||||
}
|
||||
|
@ -270,7 +270,8 @@ void cmGeneratorTarget::LookupObjectLibraries()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs)
|
||||
void
|
||||
cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs) const
|
||||
{
|
||||
for(std::vector<cmTarget*>::const_iterator
|
||||
ti = this->ObjectLibraries.begin();
|
||||
|
@ -571,7 +572,7 @@ void cmGeneratorTarget::TraceDependencies()
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGeneratorTarget::GetAppleArchs(const char* config,
|
||||
std::vector<std::string>& archVec)
|
||||
std::vector<std::string>& archVec) const
|
||||
{
|
||||
const char* archs = 0;
|
||||
if(config && *config)
|
||||
|
@ -591,7 +592,7 @@ void cmGeneratorTarget::GetAppleArchs(const char* config,
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmGeneratorTarget::GetCreateRuleVariable()
|
||||
const char* cmGeneratorTarget::GetCreateRuleVariable() const
|
||||
{
|
||||
switch(this->GetType())
|
||||
{
|
||||
|
@ -617,7 +618,7 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories(
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGeneratorTarget::GenerateTargetManifest(const char* config)
|
||||
void cmGeneratorTarget::GenerateTargetManifest(const char* config) const
|
||||
{
|
||||
if (this->Target->IsImported())
|
||||
{
|
||||
|
|
|
@ -28,9 +28,9 @@ public:
|
|||
|
||||
int GetType() const;
|
||||
const char *GetName() const;
|
||||
const char *GetProperty(const char *prop);
|
||||
bool GetPropertyAsBool(const char *prop);
|
||||
std::vector<cmSourceFile*> const& GetSourceFiles();
|
||||
const char *GetProperty(const char *prop) const;
|
||||
bool GetPropertyAsBool(const char *prop) const;
|
||||
std::vector<cmSourceFile*> const& GetSourceFiles() const;
|
||||
|
||||
cmTarget* Target;
|
||||
cmMakefile* Makefile;
|
||||
|
@ -60,22 +60,22 @@ public:
|
|||
|
||||
std::vector<cmTarget*> ObjectLibraries;
|
||||
|
||||
void UseObjectLibraries(std::vector<std::string>& objs);
|
||||
void UseObjectLibraries(std::vector<std::string>& objs) const;
|
||||
|
||||
void GetAppleArchs(const char* config,
|
||||
std::vector<std::string>& archVec);
|
||||
std::vector<std::string>& archVec) const;
|
||||
|
||||
///! Return the rule variable used to create this type of target,
|
||||
// need to add CMAKE_(LANG) for full name.
|
||||
const char* GetCreateRuleVariable();
|
||||
const char* GetCreateRuleVariable() const;
|
||||
|
||||
/** Get the include directories for this target. */
|
||||
std::vector<std::string> GetIncludeDirectories(const char *config);
|
||||
|
||||
bool IsSystemIncludeDirectory(const char *dir, const char *config);
|
||||
bool IsSystemIncludeDirectory(const char *dir, const char *config) const;
|
||||
|
||||
/** Add the target output files to the global generator manifest. */
|
||||
void GenerateTargetManifest(const char* config);
|
||||
void GenerateTargetManifest(const char* config) const;
|
||||
|
||||
/**
|
||||
* Trace through the source files in this target and add al source files
|
||||
|
@ -87,14 +87,14 @@ public:
|
|||
void LookupObjectLibraries();
|
||||
|
||||
/** Get sources that must be built before the given source. */
|
||||
std::vector<cmSourceFile*> const* GetSourceDepends(cmSourceFile* sf);
|
||||
std::vector<cmSourceFile*> const* GetSourceDepends(cmSourceFile* sf) const;
|
||||
|
||||
struct SourceEntry { std::vector<cmSourceFile*> Depends; };
|
||||
typedef std::map<cmSourceFile*, SourceEntry> SourceEntriesType;
|
||||
SourceEntriesType SourceEntries;
|
||||
|
||||
private:
|
||||
std::map<std::string, std::vector<std::string> > SystemIncludesCache;
|
||||
mutable std::map<std::string, std::vector<std::string> > SystemIncludesCache;
|
||||
|
||||
cmGeneratorTarget(cmGeneratorTarget const&);
|
||||
void operator=(cmGeneratorTarget const&);
|
||||
|
|
Loading…
Reference in New Issue