summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorOrkun Tokdemir <ilhanorkuntokdemir@gmail.com>2023-05-31 15:46:48 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-31 17:01:29 (GMT)
commitfeb56a666f1fcadcc209d8fa3de007cbbfed9f76 (patch)
tree6fe7bf561c9e163477f678e310a83654fe51b556 /Source
parent5e513e562ff66725ebb99e7cf83ad4579deebd8e (diff)
downloadCMake-feb56a666f1fcadcc209d8fa3de007cbbfed9f76.zip
CMake-feb56a666f1fcadcc209d8fa3de007cbbfed9f76.tar.gz
CMake-feb56a666f1fcadcc209d8fa3de007cbbfed9f76.tar.bz2
cmTarget: Improve const correctness of AddUtility
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx3
-rw-r--r--Source/cmTarget.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b55554d..a1aca5d 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1218,7 +1218,8 @@ void cmTarget::SetLanguageStandardProperty(std::string const& lang,
languageStandardProperty.Backtraces.emplace_back(featureBacktrace);
}
-void cmTarget::AddUtility(std::string const& name, bool cross, cmMakefile* mf)
+void cmTarget::AddUtility(std::string const& name, bool cross,
+ cmMakefile const* mf)
{
this->impl->Utilities.insert(BT<std::pair<std::string, bool>>(
{ name, cross }, mf ? mf->GetBacktrace() : cmListFileBacktrace()));
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 5fe5a28..b793065 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -174,7 +174,7 @@ public:
* commands. It is not a full path nor does it have an extension.
*/
void AddUtility(std::string const& name, bool cross,
- cmMakefile* mf = nullptr);
+ cmMakefile const* mf = nullptr);
void AddUtility(BT<std::pair<std::string, bool>> util);
//! Get the utilities used by this target
std::set<BT<std::pair<std::string, bool>>> const& GetUtilities() const;