From b33ea5783a6bc1f2adafcdbd2d2907b209a633d9 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 22 Jan 2014 14:38:10 +0100 Subject: cmMakefile: Make GetProperty const. --- Source/cmMakefile.cxx | 17 +++++++++-------- Source/cmMakefile.h | 14 +++++++------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 856462e..6b18c06 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3235,9 +3235,9 @@ void cmMakefile::AddMacro(const char* name, const char* signature) this->MacrosMap[name] = signature; } -void cmMakefile::GetListOfMacros(std::string& macros) +void cmMakefile::GetListOfMacros(std::string& macros) const { - StringStringMap::iterator it; + StringStringMap::const_iterator it; macros = ""; int cc = 0; for ( it = this->MacrosMap.begin(); it != this->MacrosMap.end(); ++it ) @@ -3673,7 +3673,7 @@ void cmMakefile::AppendProperty(const char* prop, const char* value, this->Properties.AppendProperty(prop,value,cmProperty::DIRECTORY,asString); } -const char *cmMakefile::GetPropertyOrDefinition(const char* prop) +const char *cmMakefile::GetPropertyOrDefinition(const char* prop) const { const char *ret = this->GetProperty(prop, cmProperty::DIRECTORY); if (!ret) @@ -3683,13 +3683,13 @@ const char *cmMakefile::GetPropertyOrDefinition(const char* prop) return ret; } -const char *cmMakefile::GetProperty(const char* prop) +const char *cmMakefile::GetProperty(const char* prop) const { return this->GetProperty(prop, cmProperty::DIRECTORY); } const char *cmMakefile::GetProperty(const char* prop, - cmProperty::ScopeType scope) + cmProperty::ScopeType scope) const { if(!prop) { @@ -3713,8 +3713,9 @@ const char *cmMakefile::GetProperty(const char* prop, } else if (!strcmp("LISTFILE_STACK",prop)) { - for (std::deque::iterator i = this->ListFileStack.begin(); - i != this->ListFileStack.end(); ++i) + for (std::deque::const_iterator + i = this->ListFileStack.begin(); + i != this->ListFileStack.end(); ++i) { if (i != this->ListFileStack.begin()) { @@ -3828,7 +3829,7 @@ const char *cmMakefile::GetProperty(const char* prop, return retVal; } -bool cmMakefile::GetPropertyAsBool(const char* prop) +bool cmMakefile::GetPropertyAsBool(const char* prop) const { return cmSystemTools::IsOn(this->GetProperty(prop)); } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index dadf7ff..d6a845f 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -142,7 +142,7 @@ public: void SetLocalGenerator(cmLocalGenerator*); ///! Get the current makefile generator. - cmLocalGenerator* GetLocalGenerator() + cmLocalGenerator* GetLocalGenerator() const { return this->LocalGenerator;} /** @@ -492,7 +492,7 @@ public: { this->IncludeFileRegularExpression = regex; } - const char* GetIncludeRegularExpression() + const char* GetIncludeRegularExpression() const { return this->IncludeFileRegularExpression.c_str(); } @@ -803,7 +803,7 @@ public: /** * Get a list of macros as a ; separated string */ - void GetListOfMacros(std::string& macros); + void GetListOfMacros(std::string& macros) const; /** * Return a location of a file in cmake or custom modules directory @@ -813,10 +813,10 @@ public: ///! Set/Get a property of this directory void SetProperty(const char *prop, const char *value); void AppendProperty(const char *prop, const char *value,bool asString=false); - const char *GetProperty(const char *prop); - const char *GetPropertyOrDefinition(const char *prop); - const char *GetProperty(const char *prop, cmProperty::ScopeType scope); - bool GetPropertyAsBool(const char *prop); + const char *GetProperty(const char *prop) const; + const char *GetPropertyOrDefinition(const char *prop) const; + const char *GetProperty(const char *prop, cmProperty::ScopeType scope) const; + bool GetPropertyAsBool(const char *prop) const; const char* GetFeature(const char* feature, const char* config); -- cgit v0.12 From b629240236c1212e550d2040f228344d0327e665 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 21 Jan 2014 17:07:59 +0100 Subject: cmSourceFileLocation: Use a const cmMakefile. --- Source/cmSourceFileLocation.cxx | 6 +++--- Source/cmSourceFileLocation.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 5525b61..5a8578b 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -18,7 +18,7 @@ //---------------------------------------------------------------------------- cmSourceFileLocation -::cmSourceFileLocation(cmMakefile* mf, const char* name): Makefile(mf) +::cmSourceFileLocation(cmMakefile const* mf, const char* name): Makefile(mf) { this->AmbiguousDirectory = !cmSystemTools::FileIsFullPath(name); this->AmbiguousExtension = true; @@ -89,7 +89,7 @@ void cmSourceFileLocation::UpdateExtension(const char* name) // The global generator checks extensions of enabled languages. cmGlobalGenerator* gg = this->Makefile->GetLocalGenerator()->GetGlobalGenerator(); - cmMakefile* mf = this->Makefile; + cmMakefile const* mf = this->Makefile; const std::vector& srcExts = mf->GetSourceExtensions(); const std::vector& hdrExts = mf->GetHeaderExtensions(); if(gg->GetLanguageFromExtension(ext.c_str()) || @@ -170,7 +170,7 @@ cmSourceFileLocation // Only a fixed set of extensions will be tried to match a file on // disk. One of these must match if loc refers to this source file. std::string ext = this->Name.substr(loc.Name.size()+1); - cmMakefile* mf = this->Makefile; + cmMakefile const* mf = this->Makefile; const std::vector& srcExts = mf->GetSourceExtensions(); if(std::find(srcExts.begin(), srcExts.end(), ext) != srcExts.end()) { diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h index 216dd07..c03eee7 100644 --- a/Source/cmSourceFileLocation.h +++ b/Source/cmSourceFileLocation.h @@ -33,7 +33,7 @@ public: * Construct for a source file created in a given cmMakefile * instance with an initial name. */ - cmSourceFileLocation(cmMakefile* mf, const char* name); + cmSourceFileLocation(cmMakefile const* mf, const char* name); /** * Return whether the givne source file location could refers to the @@ -81,9 +81,9 @@ public: /** * Get the cmMakefile instance for which the source file was created. */ - cmMakefile* GetMakefile() const { return this->Makefile; } + cmMakefile const* GetMakefile() const { return this->Makefile; } private: - cmMakefile* Makefile; + cmMakefile const* Makefile; bool AmbiguousDirectory; bool AmbiguousExtension; std::string Directory; -- cgit v0.12 From e68a3eadfffbdbaa00b735330aac2190583d21c1 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 21 Jan 2014 17:09:14 +0100 Subject: cmSourceFile: Use a const cmMakefile. --- Source/cmSourceFile.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index ec98c2c..23422a2 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -142,7 +142,7 @@ bool cmSourceFile::FindFullPath(std::string* error) } // The file is not generated. It must exist on disk. - cmMakefile* mf = this->Location.GetMakefile(); + cmMakefile const* mf = this->Location.GetMakefile(); const char* tryDirs[3] = {0, 0, 0}; if(this->Location.DirectoryIsAmbiguous()) { @@ -264,7 +264,7 @@ void cmSourceFile::CheckExtension() void cmSourceFile::CheckLanguage(std::string const& ext) { // Try to identify the source file language from the extension. - cmMakefile* mf = this->Location.GetMakefile(); + cmMakefile const* mf = this->Location.GetMakefile(); cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator(); if(const char* l = gg->GetLanguageFromExtension(ext.c_str())) { @@ -292,10 +292,10 @@ void cmSourceFile::SetProperty(const char* prop, const char* value) cmSystemTools::GetFilenameLastExtension(this->Location.GetName()); if (ext == ".ui") { - cmMakefile* mf = this->Location.GetMakefile(); + cmMakefile const* mf = this->Location.GetMakefile(); if (strcmp(prop, "AUTOUIC_OPTIONS") == 0) { - mf->AddQtUiFileWithOptions(this); + const_cast(mf)->AddQtUiFileWithOptions(this); } } } @@ -360,7 +360,7 @@ const char* cmSourceFile::GetProperty(const char* prop) const this->Properties.GetPropertyValue(prop, cmProperty::SOURCE_FILE, chain); if (chain) { - cmMakefile* mf = this->Location.GetMakefile(); + cmMakefile const* mf = this->Location.GetMakefile(); return mf->GetProperty(prop,cmProperty::SOURCE_FILE); } -- cgit v0.12 From fe8b0330ebb4b3347e130e8a556ec2a4edfada93 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 21 Jan 2014 15:16:43 +0100 Subject: cmMakefile: Constify some cmSourceGroup related code. --- Source/cmMakefile.cxx | 11 ++++++----- Source/cmMakefile.h | 2 +- Source/cmSourceGroup.cxx | 8 ++++---- Source/cmSourceGroup.h | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6b18c06..5a3e721 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2114,19 +2114,20 @@ cmSourceFile *cmMakefile::GetSourceFileWithOutput(const char *cname) } #if defined(CMAKE_BUILD_WITH_CMAKE) -cmSourceGroup* cmMakefile::GetSourceGroup(const std::vector&name) +cmSourceGroup* +cmMakefile::GetSourceGroup(const std::vector&name) const { cmSourceGroup* sg = 0; // first look for source group starting with the same as the one we wants - for (std::vector::iterator sgIt = this->SourceGroups.begin(); - sgIt != this->SourceGroups.end(); ++sgIt) - + for (std::vector::const_iterator + sgIt = this->SourceGroups.begin(); + sgIt != this->SourceGroups.end(); ++sgIt) { std::string sgName = sgIt->GetName(); if(sgName == name[0]) { - sg = &(*sgIt); + sg = const_cast(&(*sgIt)); break; } } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index d6a845f..bf77e56 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -639,7 +639,7 @@ public: /** * Get the source group */ - cmSourceGroup* GetSourceGroup(const std::vector&name); + cmSourceGroup* GetSourceGroup(const std::vector&name) const; #endif /** diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx index f09976f..dc0848c 100644 --- a/Source/cmSourceGroup.cxx +++ b/Source/cmSourceGroup.cxx @@ -126,12 +126,12 @@ void cmSourceGroup::AddChild(cmSourceGroup child) } //---------------------------------------------------------------------------- -cmSourceGroup *cmSourceGroup::lookupChild(const char* name) +cmSourceGroup *cmSourceGroup::lookupChild(const char* name) const { // initializing iterators - std::vector::iterator iter = + std::vector::const_iterator iter = this->Internal->GroupChildren.begin(); - std::vector::iterator end = + const std::vector::const_iterator end = this->Internal->GroupChildren.end(); // st @@ -142,7 +142,7 @@ cmSourceGroup *cmSourceGroup::lookupChild(const char* name) // look if descenened is the one were looking for if(sgName == name) { - return &(*iter); // if it so return it + return const_cast(&(*iter)); // if it so return it } } diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index 11a0c74..fd806da 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -56,7 +56,7 @@ public: /** * Looks up child and returns it */ - cmSourceGroup *lookupChild(const char *name); + cmSourceGroup *lookupChild(const char *name) const; /** * Get the name of this group. -- cgit v0.12 From 5cc9fb02349e4b7e63f3cb087dc37b3c9b096e1d Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 22 Jan 2014 14:45:13 +0100 Subject: cmSourceGroup: Fix method name capitalization. Adhere to the dominant style. --- Source/cmMakefile.cxx | 4 ++-- Source/cmSourceGroup.cxx | 2 +- Source/cmSourceGroup.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5a3e721..6dc6a46 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2137,7 +2137,7 @@ cmMakefile::GetSourceGroup(const std::vector&name) const // iterate through its children to find match source group for(unsigned int i=1; ilookupChild(name[i].c_str()); + sg = sg->LookupChild(name[i].c_str()); if(sg == 0) { break; @@ -2208,7 +2208,7 @@ void cmMakefile::AddSourceGroup(const std::vector& name, for(++i; i<=lastElement; ++i) { sg->AddChild(cmSourceGroup(name[i].c_str(), 0, sg->GetFullName())); - sg = sg->lookupChild(name[i].c_str()); + sg = sg->LookupChild(name[i].c_str()); fullname = sg->GetFullName(); if(strlen(fullname)) { diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx index dc0848c..d272b6c 100644 --- a/Source/cmSourceGroup.cxx +++ b/Source/cmSourceGroup.cxx @@ -126,7 +126,7 @@ void cmSourceGroup::AddChild(cmSourceGroup child) } //---------------------------------------------------------------------------- -cmSourceGroup *cmSourceGroup::lookupChild(const char* name) const +cmSourceGroup *cmSourceGroup::LookupChild(const char* name) const { // initializing iterators std::vector::const_iterator iter = diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index fd806da..3bbdef9 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -56,7 +56,7 @@ public: /** * Looks up child and returns it */ - cmSourceGroup *lookupChild(const char *name) const; + cmSourceGroup *LookupChild(const char *name) const; /** * Get the name of this group. -- cgit v0.12 From 2a6e56e078666a48d3e34b36c1500d44c429ecf0 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 21 Jan 2014 15:23:27 +0100 Subject: cmCacheManager: Consify version accessors. --- Source/cmCacheManager.h | 6 ++++-- Source/cmMakefile.cxx | 4 ++-- Source/cmMakefile.h | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index 4b8c07d..f487e8e 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -145,8 +145,10 @@ public: const char* GetCacheValue(const char* key) const; /** Get the version of CMake that wrote the cache. */ - unsigned int GetCacheMajorVersion() { return this->CacheMajorVersion; } - unsigned int GetCacheMinorVersion() { return this->CacheMinorVersion; } + unsigned int GetCacheMajorVersion() const + { return this->CacheMajorVersion; } + unsigned int GetCacheMinorVersion() const + { return this->CacheMinorVersion; } bool NeedCacheCompatibility(int major, int minor); protected: diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6dc6a46..6266f82 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -169,12 +169,12 @@ void cmMakefile::Initialize() this->CheckCMP0000 = false; } -unsigned int cmMakefile::GetCacheMajorVersion() +unsigned int cmMakefile::GetCacheMajorVersion() const { return this->GetCacheManager()->GetCacheMajorVersion(); } -unsigned int cmMakefile::GetCacheMinorVersion() +unsigned int cmMakefile::GetCacheMinorVersion() const { return this->GetCacheManager()->GetCacheMinorVersion(); } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index bf77e56..4c7341e 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -63,8 +63,8 @@ public: * was used to write the currently loaded cache, note * this method will not work before the cache is loaded. */ - unsigned int GetCacheMajorVersion(); - unsigned int GetCacheMinorVersion(); + unsigned int GetCacheMajorVersion() const; + unsigned int GetCacheMinorVersion() const; /* Check for unused variables in this scope */ void CheckForUnusedVariables() const; -- cgit v0.12 From d6d4eaac0659b1efea785888f2aab759a1b6b557 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 22 Jan 2014 14:58:58 +0100 Subject: cmMakefile: Constify policies accessors. --- Source/cmMakefile.cxx | 8 ++++---- Source/cmMakefile.h | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6266f82..99aad51 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4287,7 +4287,7 @@ std::vector cmMakefile::GetQtUiFilesWithOptions() const //---------------------------------------------------------------------------- cmPolicies::PolicyStatus -cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) +cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const { // Get the current setting of the policy. cmPolicies::PolicyStatus cur = this->GetPolicyStatusInternal(id); @@ -4315,10 +4315,10 @@ cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) //---------------------------------------------------------------------------- cmPolicies::PolicyStatus -cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) +cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const { // Is the policy set in our stack? - for(PolicyStackType::reverse_iterator psi = this->PolicyStack.rbegin(); + for(PolicyStackType::const_reverse_iterator psi = this->PolicyStack.rbegin(); psi != this->PolicyStack.rend(); ++psi) { PolicyStackEntry::const_iterator pse = psi->find(id); @@ -4468,7 +4468,7 @@ bool cmMakefile::SetPolicyVersion(const char *version) ApplyPolicyVersion(this,version); } -cmPolicies *cmMakefile::GetPolicies() +cmPolicies *cmMakefile::GetPolicies() const { if (!this->GetCMakeInstance()) { diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4c7341e..1e90122 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -356,7 +356,7 @@ public: */ bool SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); bool SetPolicy(const char *id, cmPolicies::PolicyStatus status); - cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id); + cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id) const; bool SetPolicyVersion(const char *version); void RecordPolicies(cmPolicies::PolicyMap& pm); //@} @@ -379,7 +379,7 @@ public: /** * Get the Policies Instance */ - cmPolicies *GetPolicies(); + cmPolicies *GetPolicies() const; /** * Add an auxiliary directory to the build. @@ -1031,7 +1031,8 @@ private: typedef std::vector PolicyStackType; PolicyStackType PolicyStack; std::vector PolicyBarriers; - cmPolicies::PolicyStatus GetPolicyStatusInternal(cmPolicies::PolicyID id); + cmPolicies::PolicyStatus + GetPolicyStatusInternal(cmPolicies::PolicyID id) const; bool CheckCMP0000; -- cgit v0.12 From c6c0bd9d2f237b17e2aad0db44a7c860040b2cd3 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 21 Jan 2014 16:33:30 +0100 Subject: cmMakefile: Consify custom command API. --- Source/cmCustomCommand.cxx | 2 +- Source/cmCustomCommand.h | 2 +- Source/cmMakefile.cxx | 2 +- Source/cmMakefile.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index 3620a38..b672148 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -64,7 +64,7 @@ cmCustomCommand& cmCustomCommand::operator=(cmCustomCommand const& r) } //---------------------------------------------------------------------------- -cmCustomCommand::cmCustomCommand(cmMakefile* mf, +cmCustomCommand::cmCustomCommand(cmMakefile const* mf, const std::vector& outputs, const std::vector& depends, const cmCustomCommandLines& commandLines, diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index e20d2bf..6851105 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -30,7 +30,7 @@ public: cmCustomCommand& operator=(cmCustomCommand const& r); /** Main constructor specifies all information for the command. */ - cmCustomCommand(cmMakefile* mf, + cmCustomCommand(cmMakefile const* mf, const std::vector& outputs, const std::vector& depends, const cmCustomCommandLines& commandLines, diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 99aad51..006f971 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -884,7 +884,7 @@ cmMakefile::AddCustomCommandToTarget(const char* target, cmTarget::CustomCommandType type, const char* comment, const char* workingDir, - bool escapeOldStyle) + bool escapeOldStyle) const { // Find the target to which to add the custom command. cmTargets::iterator ti = this->Targets.find(target); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 1e90122..5622b7f 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -173,7 +173,7 @@ public: const cmCustomCommandLines& commandLines, cmTarget::CustomCommandType type, const char* comment, const char* workingDir, - bool escapeOldStyle = true); + bool escapeOldStyle = true) const; cmSourceFile* AddCustomCommandToOutput( const std::vector& outputs, const std::vector& depends, -- cgit v0.12 From 9b05bc4fcc962966f8bddde48f57b21ebb52a4df Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 22 Jan 2014 15:02:09 +0100 Subject: cmMakefile: Remove method declarations with no implementation. --- Source/cmMakefile.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 5622b7f..f788a53 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -547,7 +547,6 @@ public: * Mark include directories as system directories. */ void AddSystemIncludeDirectories(const std::set &incs); - bool IsSystemIncludeDirectory(const char* dir, const char *config); /** Expand out any arguements in the vector that have ; separated * strings into multiple arguements. A new vector is created @@ -1005,7 +1004,6 @@ private: CallStackType CallStack; friend class cmMakefileCall; - cmTarget* FindBasicTarget(const char* name); std::vector ImportedTargetsOwned; std::map ImportedTargets; -- cgit v0.12 From 9073318fc4bf6e71880ed6ad48a2d09d5ec4fb8c Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 22 Jan 2014 15:06:59 +0100 Subject: cmMakefile: Remove non-const version of method The const version suffices. --- Source/cmMakefile.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index f788a53..7aee00c 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -250,13 +250,6 @@ public: */ void AddLinkDirectory(const char*); - /** - * Get the list of link directories - */ - std::vector& GetLinkDirectories() - { - return this->LinkDirectories; - } const std::vector& GetLinkDirectories() const { return this->LinkDirectories; -- cgit v0.12 From 01d7ceda5dda53125da2bce994114ca5154bf365 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 22 Jan 2014 15:00:29 +0100 Subject: cmMakefile: Trivially constify some methods. --- Source/cmMakefile.cxx | 47 ++++++++++++++++++++++--------------------- Source/cmMakefile.h | 55 ++++++++++++++++++++++++--------------------------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 006f971..ebc816e 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -179,7 +179,7 @@ unsigned int cmMakefile::GetCacheMinorVersion() const return this->GetCacheManager()->GetCacheMinorVersion(); } -bool cmMakefile::NeedCacheCompatibility(int major, int minor) +bool cmMakefile::NeedCacheCompatibility(int major, int minor) const { return this->GetCacheManager()->NeedCacheCompatibility(major, minor); } @@ -260,7 +260,7 @@ void cmMakefile // call print on all the classes in the makefile -void cmMakefile::Print() +void cmMakefile::Print() const { // print the class lists std::cout << "classes:\n"; @@ -359,7 +359,7 @@ bool cmMakefile::GetBacktrace(cmListFileBacktrace& backtrace) const } //---------------------------------------------------------------------------- -void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) +void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff) const { cmOStringStream msg; msg << lff.FilePath << "(" << lff.Line << "): "; @@ -734,7 +734,7 @@ bool cmMakefile::ReadListFile(const char* filename_in, } //---------------------------------------------------------------------------- -void cmMakefile::EnforceDirectoryLevelRules() +void cmMakefile::EnforceDirectoryLevelRules() const { // Diagnose a violation of CMP0000 if necessary. if(this->CheckCMP0000) @@ -2058,7 +2058,8 @@ cmMakefile::AddNewTarget(cmTarget::TargetType type, const char* name) return &it->second; } -cmSourceFile *cmMakefile::LinearGetSourceFileWithOutput(const char *cname) +cmSourceFile* +cmMakefile::LinearGetSourceFileWithOutput(const char *cname) const { std::string name = cname; std::string out; @@ -2094,7 +2095,7 @@ cmSourceFile *cmMakefile::LinearGetSourceFileWithOutput(const char *cname) return 0; } -cmSourceFile *cmMakefile::GetSourceFileWithOutput(const char *cname) +cmSourceFile *cmMakefile::GetSourceFileWithOutput(const char *cname) const { std::string name = cname; @@ -2105,7 +2106,7 @@ cmSourceFile *cmMakefile::GetSourceFileWithOutput(const char *cname) return LinearGetSourceFileWithOutput(cname); } // Otherwise we use an efficient lookup map. - OutputToSourceMap::iterator o = this->OutputToSource.find(name); + OutputToSourceMap::const_iterator o = this->OutputToSource.find(name); if (o != this->OutputToSource.end()) { return (*o).second; @@ -2376,7 +2377,7 @@ const char* cmMakefile::GetSONameFlag(const char* language) const return GetDefinition(name.c_str()); } -bool cmMakefile::CanIWriteThisFile(const char* fileName) +bool cmMakefile::CanIWriteThisFile(const char* fileName) const { if ( !this->IsOn("CMAKE_DISABLE_SOURCE_CHANGES") ) { @@ -2518,7 +2519,7 @@ std::vector cmMakefile } -const char *cmMakefile::ExpandVariablesInString(std::string& source) +const char *cmMakefile::ExpandVariablesInString(std::string& source) const { return this->ExpandVariablesInString(source, false, false); } @@ -2530,7 +2531,7 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source, const char* filename, long line, bool removeEmpty, - bool replaceAt) + bool replaceAt) const { if ( source.empty() || source.find_first_of("$@\\") == source.npos) { @@ -2865,7 +2866,7 @@ void cmMakefile::PopFunctionBlockerBarrier(bool reportError) bool cmMakefile::ExpandArguments( std::vector const& inArgs, - std::vector& outArgs) + std::vector& outArgs) const { std::vector::const_iterator i; std::string value; @@ -3009,7 +3010,7 @@ void cmMakefile::SetArgcArgv(const std::vector& args) } //---------------------------------------------------------------------------- -cmSourceFile* cmMakefile::GetSource(const char* sourceName) +cmSourceFile* cmMakefile::GetSource(const char* sourceName) const { cmSourceFileLocation sfl(this, sourceName); for(std::vector::const_iterator @@ -3057,7 +3058,7 @@ void cmMakefile::EnableLanguage(std::vector const & lang, void cmMakefile::ExpandSourceListArguments( std::vector const& arguments, - std::vector& newargs, unsigned int /* start */) + std::vector& newargs, unsigned int /* start */) const { // now expand the args unsigned int i; @@ -3257,7 +3258,7 @@ cmCacheManager *cmMakefile::GetCacheManager() const return this->GetCMakeInstance()->GetCacheManager(); } -void cmMakefile::DisplayStatus(const char* message, float s) +void cmMakefile::DisplayStatus(const char* message, float s) const { cmake* cm = this->GetLocalGenerator()->GetGlobalGenerator() ->GetCMakeInstance(); @@ -3270,7 +3271,7 @@ void cmMakefile::DisplayStatus(const char* message, float s) cm->UpdateProgress(message, s); } -std::string cmMakefile::GetModulesFile(const char* filename) +std::string cmMakefile::GetModulesFile(const char* filename) const { std::string result; @@ -3939,13 +3940,13 @@ void cmMakefile::AddCMakeDependFilesFromUser() } } -std::string cmMakefile::GetListFileStack() +std::string cmMakefile::GetListFileStack() const { cmOStringStream tmp; size_t depth = this->ListFileStack.size(); if (depth > 0) { - std::deque::iterator it = this->ListFileStack.end(); + std::deque::const_iterator it = this->ListFileStack.end(); do { if (depth != this->ListFileStack.size()) @@ -4091,7 +4092,7 @@ cmMakefile::AddImportedTarget(const char* name, cmTarget::TargetType type, //---------------------------------------------------------------------------- cmTarget* cmMakefile::FindTargetToUse(const std::string& name, - bool excludeAliases) + bool excludeAliases) const { // Look for an imported target. These take priority because they // are more local in scope and do not have to be globally unique. @@ -4115,7 +4116,7 @@ cmTarget* cmMakefile::FindTargetToUse(const std::string& name, } //---------------------------------------------------------------------------- -bool cmMakefile::IsAlias(const std::string& name) +bool cmMakefile::IsAlias(const std::string& name) const { if (this->AliasTargets.find(name) != this->AliasTargets.end()) return true; @@ -4124,7 +4125,8 @@ bool cmMakefile::IsAlias(const std::string& name) } //---------------------------------------------------------------------------- -cmGeneratorTarget* cmMakefile::FindGeneratorTargetToUse(const char* name) +cmGeneratorTarget* +cmMakefile::FindGeneratorTargetToUse(const char* name) const { if (cmTarget *t = this->FindTargetToUse(name)) { @@ -4135,7 +4137,7 @@ cmGeneratorTarget* cmMakefile::FindGeneratorTargetToUse(const char* name) //---------------------------------------------------------------------------- bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg, - bool isCustom) + bool isCustom) const { if(this->IsAlias(name)) { @@ -4226,7 +4228,8 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg, } //---------------------------------------------------------------------------- -bool cmMakefile::EnforceUniqueDir(const char* srcPath, const char* binPath) +bool cmMakefile::EnforceUniqueDir(const char* srcPath, + const char* binPath) const { // Make sure the binary directory is unique. cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator(); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 7aee00c..3d4a08a 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -76,7 +76,7 @@ public: bool VariableUsed(const char* ) const; /** Return whether compatibility features needed for a version of the cache or lower should be enabled. */ - bool NeedCacheCompatibility(int major, int minor); + bool NeedCacheCompatibility(int major, int minor) const; /** * Construct an empty makefile. @@ -149,7 +149,7 @@ public: * Help enforce global target name uniqueness. */ bool EnforceUniqueName(std::string const& name, std::string& msg, - bool isCustom = false); + bool isCustom = false) const; /** * Perform FinalPass, Library dependency analysis etc before output of the @@ -165,7 +165,7 @@ public: /** * Print the object state to std::cout. */ - void Print(); + void Print() const; /** Add a custom command to the build. */ void AddCustomCommandToTarget(const char* target, @@ -498,7 +498,7 @@ public: { this->ComplainFileRegularExpression = regex; } - const char* GetComplainRegularExpression() + const char* GetComplainRegularExpression() const { return this->ComplainFileRegularExpression.c_str(); } @@ -532,9 +532,9 @@ public: /** Find a target to use in place of the given name. The target returned may be imported or built within the project. */ cmTarget* FindTargetToUse(const std::string& name, - bool excludeAliases = false); - bool IsAlias(const std::string& name); - cmGeneratorTarget* FindGeneratorTargetToUse(const char* name); + bool excludeAliases = false) const; + bool IsAlias(const std::string& name) const; + cmGeneratorTarget* FindGeneratorTargetToUse(const char* name) const; /** * Mark include directories as system directories. @@ -550,12 +550,12 @@ public: */ void ExpandSourceListArguments(std::vector const& argsIn, std::vector& argsOut, - unsigned int startArgumentIndex); + unsigned int startArgumentIndex) const; /** Get a cmSourceFile pointer for a given source name, if the name is * not found, then a null pointer is returned. */ - cmSourceFile* GetSource(const char* sourceName); + cmSourceFile* GetSource(const char* sourceName) const; /** Get a cmSourceFile pointer for a given source name, if the name is * not found, then create the source file and return it. generated @@ -568,7 +568,7 @@ public: /** * Obtain a list of auxiliary source directories. */ - std::vector& GetAuxSourceDirectories() + const std::vector& GetAuxSourceDirectories() const {return this->AuxSourceDirectories;} //@{ @@ -613,13 +613,13 @@ public: /** * Get a list of preprocessor define flags. */ - const char* GetDefineFlags() + const char* GetDefineFlags() const {return this->DefineFlags.c_str();} /** * Make sure CMake can write this file */ - bool CanIWriteThisFile(const char* fileName); + bool CanIWriteThisFile(const char* fileName) const; #if defined(CMAKE_BUILD_WITH_CMAKE) /** @@ -644,10 +644,7 @@ public: { this->ListFiles.push_back(file);} void AddCMakeDependFilesFromUser(); - /** - * Get the list file stack as a string - */ - std::string GetListFileStack(); + std::string GetListFileStack() const; /** * Get the current context backtrace. @@ -669,14 +666,14 @@ public: * entry in the this->Definitions map. Also \@var\@ is * expanded to match autoconf style expansions. */ - const char *ExpandVariablesInString(std::string& source); + const char *ExpandVariablesInString(std::string& source) const; const char *ExpandVariablesInString(std::string& source, bool escapeQuotes, bool noEscapes, bool atOnly = false, const char* filename = 0, long line = -1, bool removeEmpty = false, - bool replaceAt = true); + bool replaceAt = true) const; /** * Remove any remaining variables in the string. Anything with ${var} or @@ -716,7 +713,7 @@ public: /** * Print a command's invocation */ - void PrintCommandTrace(const cmListFileFunction& lff); + void PrintCommandTrace(const cmListFileFunction& lff) const; /** * Execute a single CMake command. Returns true if the command @@ -752,14 +749,14 @@ public: #endif ///! Display progress or status message. - void DisplayStatus(const char*, float); + void DisplayStatus(const char*, float) const; /** * Expand the given list file arguments into the full set after * variable replacement and list expansion. */ bool ExpandArguments(std::vector const& inArgs, - std::vector& outArgs); + std::vector& outArgs) const; /** * Get the instance */ @@ -776,7 +773,7 @@ public: * Is there a source file that has the provided source file as an output? * if so then return it */ - cmSourceFile *GetSourceFileWithOutput(const char *outName); + cmSourceFile *GetSourceFileWithOutput(const char *outName) const; /** * Add a macro to the list of macros. The arguments should be name of the @@ -800,7 +797,7 @@ public: /** * Return a location of a file in cmake or custom modules directory */ - std::string GetModulesFile(const char* name); + std::string GetModulesFile(const char* name) const; ///! Set/Get a property of this directory void SetProperty(const char *prop, const char *value); @@ -829,7 +826,7 @@ public: void AddTestGenerator(cmTestGenerator* g) { if(g) this->TestGenerators.push_back(g); } - std::vector& GetTestGenerators() + const std::vector& GetTestGenerators() const { return this->TestGenerators; } // Define the properties @@ -869,7 +866,7 @@ public: return this->CompileDefinitionsEntries; } - bool IsGeneratingBuildSystem(){ return this->GeneratingBuildSystem; } + bool IsGeneratingBuildSystem() const { return this->GeneratingBuildSystem; } void SetGeneratingBuildSystem(){ this->GeneratingBuildSystem = true; } void AddQtUiFileWithOptions(cmSourceFile *sf); @@ -950,7 +947,7 @@ private: bool ParseDefineFlag(std::string const& definition, bool remove); - bool EnforceUniqueDir(const char* srcPath, const char* binPath); + bool EnforceUniqueDir(const char* srcPath, const char* binPath) const; friend class cmMakeDepend; // make depend needs direct access // to the Sources array @@ -973,7 +970,7 @@ private: cmsys::RegularExpression cmDefineRegex; cmsys::RegularExpression cmDefine01Regex; - cmsys::RegularExpression cmAtVarRegex; + mutable cmsys::RegularExpression cmAtVarRegex; cmPropertyMap Properties; @@ -1028,7 +1025,7 @@ private: bool CheckCMP0000; // Enforce rules about CMakeLists.txt files. - void EnforceDirectoryLevelRules(); + void EnforceDirectoryLevelRules() const; bool GeneratingBuildSystem; /** @@ -1037,7 +1034,7 @@ private: * relative file paths. It is used as a fall back by * GetSourceFileWithOutput(const char*). */ - cmSourceFile *LinearGetSourceFileWithOutput(const char *cname); + cmSourceFile *LinearGetSourceFileWithOutput(const char *cname) const; // A map for fast output to input look up. #if defined(CMAKE_BUILD_WITH_CMAKE) -- cgit v0.12 From bf1e1bf1d0a8a966af0c8e454d0bc11b5ed874e1 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 21 Jan 2014 16:43:47 +0100 Subject: cmMakefile: Make FindSourceGroup const. Return a pointer instead of a reference. This allows making the accessor const with the least impact. --- Source/cmExtraEclipseCDT4Generator.cxx | 4 ++-- Source/cmGlobalXCodeGenerator.cxx | 8 ++++---- Source/cmLocalVisualStudio6Generator.cxx | 4 ++-- Source/cmLocalVisualStudio7Generator.cxx | 4 ++-- Source/cmMakefile.cxx | 10 +++++----- Source/cmMakefile.h | 4 ++-- Source/cmVisualStudio10TargetGenerator.cxx | 8 ++++---- 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::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& configs, * non-inherited SOURCE_GROUP commands will have precedence over * inherited ones. */ -cmSourceGroup& +cmSourceGroup* cmMakefile::FindSourceGroup(const char* source, - std::vector &groups) + std::vector &groups) const { // First search for a group that lists the file explicitly. for(std::vector::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 &groups); + cmSourceGroup* FindSourceGroup(const char* source, + std::vector &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); -- cgit v0.12 From bde0dab15d6bdefeadd329a67dbe53812d9f3254 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 22 Jan 2014 16:33:56 +0100 Subject: cmMakefile: Make ConfigureString const. --- Source/cmMakefile.cxx | 2 +- Source/cmMakefile.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index fa8918e..55a9d5c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3371,7 +3371,7 @@ std::string cmMakefile::GetModulesFile(const char* filename) const void cmMakefile::ConfigureString(const std::string& input, std::string& output, bool atOnly, - bool escapeQuotes) + bool escapeQuotes) const { // Split input to handle one line at a time. std::string::const_iterator lineStart = input.begin(); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index dac3dfb..66a33bb 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -692,7 +692,7 @@ public: * See cmConfigureFileCommand for details. */ void ConfigureString(const std::string& input, std::string& output, - bool atOnly, bool escapeQuotes); + bool atOnly, bool escapeQuotes) const; /** * Copy file but change lines acording to ConfigureString @@ -968,8 +968,8 @@ private: std::map SubDirectoryOrder; - cmsys::RegularExpression cmDefineRegex; - cmsys::RegularExpression cmDefine01Regex; + mutable cmsys::RegularExpression cmDefineRegex; + mutable cmsys::RegularExpression cmDefine01Regex; mutable cmsys::RegularExpression cmAtVarRegex; cmPropertyMap Properties; -- cgit v0.12