summaryrefslogtreecommitdiff
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorCengizhan Pasaoglu <cengizhanpasaoglu@gmail.com>2020-10-18 02:00:29 +0300
committerCengizhan Pasaoglu <cengizhanpasaoglu@gmail.com>2020-10-20 00:04:04 +0300
commitbd705788f67741df88bf153825a5943b4b518818 (patch)
tree356596cc5ca5d3f2ad2de7954257903301143bd8 /Source/cmTarget.cxx
parentc05e561474c422d23b9f1d29ccb5ceea0037477b (diff)
downloadcmake-bd705788f67741df88bf153825a5943b4b518818.tar.gz
Constify some code as suggested by clang-tidy
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index e076d1e39a..4eebec6abf 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -213,7 +213,7 @@ public:
bool CheckImportedLibName(std::string const& prop,
std::string const& value) const;
- std::string ProcessSourceItemCMP0049(const std::string& s);
+ std::string ProcessSourceItemCMP0049(const std::string& s) const;
};
namespace {
@@ -740,7 +740,8 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs)
}
}
-std::string cmTargetInternals::ProcessSourceItemCMP0049(const std::string& s)
+std::string cmTargetInternals::ProcessSourceItemCMP0049(
+ const std::string& s) const
{
std::string src = s;
@@ -791,7 +792,7 @@ struct CreateLocation
{
}
- cmSourceFileLocation operator()(const std::string& filename)
+ cmSourceFileLocation operator()(const std::string& filename) const
{
return cmSourceFileLocation(this->Makefile, filename);
}
@@ -857,7 +858,7 @@ cmSourceFile* cmTarget::AddSource(const std::string& src, bool before)
cmSourceFileLocationKind::Known);
}
-void cmTarget::ClearDependencyInformation(cmMakefile& mf)
+void cmTarget::ClearDependencyInformation(cmMakefile& mf) const
{
std::string depname = cmStrCat(this->GetName(), "_LIB_DEPENDS");
mf.RemoveCacheDefinition(depname);