1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

cmRuntimeDependencyArchive: Fix const-ness of method signatures

This commit is contained in:
Kyle Edwards
2021-04-20 16:16:57 -04:00
parent 9c33ff4dda
commit b613e09778
2 changed files with 20 additions and 18 deletions

View File

@@ -198,25 +198,26 @@ void cmRuntimeDependencyArchive::SetError(const std::string& e)
this->Status.SetError(e);
}
std::string cmRuntimeDependencyArchive::GetBundleExecutable()
const std::string& cmRuntimeDependencyArchive::GetBundleExecutable() const
{
return this->BundleExecutable;
}
const std::vector<std::string>&
cmRuntimeDependencyArchive::GetSearchDirectories()
cmRuntimeDependencyArchive::GetSearchDirectories() const
{
return this->SearchDirectories;
}
std::string cmRuntimeDependencyArchive::GetGetRuntimeDependenciesTool()
const std::string& cmRuntimeDependencyArchive::GetGetRuntimeDependenciesTool()
const
{
return this->GetMakefile()->GetSafeDefinition(
"CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL");
}
bool cmRuntimeDependencyArchive::GetGetRuntimeDependenciesCommand(
const std::string& search, std::vector<std::string>& command)
const std::string& search, std::vector<std::string>& command) const
{
// First see if it was supplied by the user
std::string toolCommand = this->GetMakefile()->GetSafeDefinition(
@@ -309,7 +310,7 @@ bool cmRuntimeDependencyArchive::GetGetRuntimeDependenciesCommand(
return false;
}
bool cmRuntimeDependencyArchive::IsPreExcluded(const std::string& name)
bool cmRuntimeDependencyArchive::IsPreExcluded(const std::string& name) const
{
cmsys::RegularExpressionMatch match;
auto const regexMatch =
@@ -326,7 +327,7 @@ bool cmRuntimeDependencyArchive::IsPreExcluded(const std::string& name)
regexSearch(this->PreExcludeRegexes);
}
bool cmRuntimeDependencyArchive::IsPostExcluded(const std::string& name)
bool cmRuntimeDependencyArchive::IsPostExcluded(const std::string& name) const
{
cmsys::RegularExpressionMatch match;
auto const regexMatch =
@@ -373,18 +374,19 @@ void cmRuntimeDependencyArchive::AddUnresolvedPath(const std::string& name)
this->UnresolvedPaths.insert(name);
}
cmMakefile* cmRuntimeDependencyArchive::GetMakefile()
cmMakefile* cmRuntimeDependencyArchive::GetMakefile() const
{
return &this->Status.GetMakefile();
}
const std::map<std::string, std::set<std::string>>&
cmRuntimeDependencyArchive::GetResolvedPaths()
cmRuntimeDependencyArchive::GetResolvedPaths() const
{
return this->ResolvedPaths;
}
const std::set<std::string>& cmRuntimeDependencyArchive::GetUnresolvedPaths()
const
{
return this->UnresolvedPaths;
}

View File

@@ -36,21 +36,21 @@ public:
void SetError(const std::string& e);
std::string GetBundleExecutable();
const std::vector<std::string>& GetSearchDirectories();
std::string GetGetRuntimeDependenciesTool();
bool GetGetRuntimeDependenciesCommand(const std::string& search,
std::vector<std::string>& command);
bool IsPreExcluded(const std::string& name);
bool IsPostExcluded(const std::string& name);
const std::string& GetBundleExecutable() const;
const std::vector<std::string>& GetSearchDirectories() const;
const std::string& GetGetRuntimeDependenciesTool() const;
bool GetGetRuntimeDependenciesCommand(
const std::string& search, std::vector<std::string>& command) const;
bool IsPreExcluded(const std::string& name) const;
bool IsPostExcluded(const std::string& name) const;
void AddResolvedPath(const std::string& name, const std::string& path,
bool& unique);
void AddUnresolvedPath(const std::string& name);
cmMakefile* GetMakefile();
const std::map<std::string, std::set<std::string>>& GetResolvedPaths();
const std::set<std::string>& GetUnresolvedPaths();
cmMakefile* GetMakefile() const;
const std::map<std::string, std::set<std::string>>& GetResolvedPaths() const;
const std::set<std::string>& GetUnresolvedPaths() const;
private:
cmExecutionStatus& Status;