summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-09-06 13:54:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-09-06 13:54:56 (GMT)
commite1ebec55d4b3e9db2c718064237707252ec4abf5 (patch)
tree6c526cc47975e057eead5be65a9506e5ee3dd824 /Source/cmMakefile.cxx
parent3ecbe1987d56b905853a5fae4f5664befed0e223 (diff)
parent4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0 (diff)
downloadCMake-e1ebec55d4b3e9db2c718064237707252ec4abf5.zip
CMake-e1ebec55d4b3e9db2c718064237707252ec4abf5.tar.gz
CMake-e1ebec55d4b3e9db2c718064237707252ec4abf5.tar.bz2
Merge topic 'grd-stdstring'
4d89830d71 cmMakefile: Make GetRequiredDefinition return std::string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2347
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 90c8599..11019d7 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2354,16 +2354,16 @@ bool cmMakefile::CanIWriteThisFile(std::string const& fileName) const
cmSystemTools::SameFile(fileName, this->GetHomeOutputDirectory());
}
-const char* cmMakefile::GetRequiredDefinition(const std::string& name) const
+std::string cmMakefile::GetRequiredDefinition(const std::string& name) const
{
const char* ret = this->GetDefinition(name);
if (!ret) {
cmSystemTools::Error("Error required internal CMake variable not "
"set, cmake may not be built correctly.\n",
"Missing variable is:\n", name.c_str());
- return "";
+ return std::string();
}
- return ret;
+ return std::string(ret);
}
bool cmMakefile::IsDefinitionSet(const std::string& name) const