diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-05-28 14:27:03 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-05-30 14:41:59 (GMT) |
commit | 4fc322bab421a83b12977aadc7dca247db8ae541 (patch) | |
tree | 3e57b548bd2326f3a848eb23ad66da33d28f60b5 /Source/cmMakefile.h | |
parent | b0d1ddb7234950374977b83f8dbded806c15b356 (diff) | |
download | CMake-4fc322bab421a83b12977aadc7dca247db8ae541.zip CMake-4fc322bab421a83b12977aadc7dca247db8ae541.tar.gz CMake-4fc322bab421a83b12977aadc7dca247db8ae541.tar.bz2 |
AddCacheEntry: Suppress raw pointer usage
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 6fdadab..7005942 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -302,14 +302,23 @@ public: */ void AddDefinitionBool(const std::string& name, bool); //! Add a definition to this makefile and the global cmake cache. - void AddCacheDefinition(const std::string& name, const char* value, - const char* doc, cmStateEnums::CacheEntryType type, + void AddCacheDefinition(const std::string& name, cmValue value, cmValue doc, + cmStateEnums::CacheEntryType type, bool force = false); + void AddCacheDefinition(const std::string& name, cmValue value, + const std::string& doc, + cmStateEnums::CacheEntryType type, + bool force = false) + { + this->AddCacheDefinition(name, value, cmValue{ doc }, type, force); + } void AddCacheDefinition(const std::string& name, const std::string& value, - const char* doc, cmStateEnums::CacheEntryType type, + const std::string& doc, + cmStateEnums::CacheEntryType type, bool force = false) { - this->AddCacheDefinition(name, value.c_str(), doc, type, force); + this->AddCacheDefinition(name, cmValue{ value }, cmValue{ doc }, type, + force); } /** |