summaryrefslogtreecommitdiffstats
path: root/Source/cmProjectCommand.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-11 13:40:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-03-11 13:40:43 (GMT)
commit36a5b3d1d165830045b9d7019fbe3df250ce0685 (patch)
treedb147061900c875292e999f0458d36d2b68f6d93 /Source/cmProjectCommand.cxx
parentc7c6e103d1209f7e29cb2909cf342be75478f304 (diff)
downloadCMake-36a5b3d1d165830045b9d7019fbe3df250ce0685.zip
CMake-36a5b3d1d165830045b9d7019fbe3df250ce0685.tar.gz
CMake-36a5b3d1d165830045b9d7019fbe3df250ce0685.tar.bz2
cmMakefile::AddCacheDefinition: Add overload that accepts std::string value
Diffstat (limited to 'Source/cmProjectCommand.cxx')
-rw-r--r--Source/cmProjectCommand.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index a25fd42..2ec66d9 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -47,10 +47,10 @@ bool cmProjectCommand(std::vector<std::string> const& args,
mf.SetProjectName(projectName);
mf.AddCacheDefinition(projectName + "_BINARY_DIR",
- mf.GetCurrentBinaryDirectory().c_str(),
+ mf.GetCurrentBinaryDirectory(),
"Value Computed by CMake", cmStateEnums::STATIC);
mf.AddCacheDefinition(projectName + "_SOURCE_DIR",
- mf.GetCurrentSourceDirectory().c_str(),
+ mf.GetCurrentSourceDirectory(),
"Value Computed by CMake", cmStateEnums::STATIC);
mf.AddDefinition("PROJECT_BINARY_DIR", mf.GetCurrentBinaryDirectory());
@@ -66,7 +66,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
// will work.
if (!mf.GetDefinition("CMAKE_PROJECT_NAME") || mf.IsRootMakefile()) {
mf.AddDefinition("CMAKE_PROJECT_NAME", projectName);
- mf.AddCacheDefinition("CMAKE_PROJECT_NAME", projectName.c_str(),
+ mf.AddCacheDefinition("CMAKE_PROJECT_NAME", projectName,
"Value Computed by CMake", cmStateEnums::STATIC);
}
@@ -379,7 +379,7 @@ static void TopLevelCMakeVarCondSet(cmMakefile& mf, std::string const& name,
// CMakeLists.txt file, then go with the last one.
if (!mf.GetDefinition(name) || mf.IsRootMakefile()) {
mf.AddDefinition(name, value);
- mf.AddCacheDefinition(name, value.c_str(), "Value Computed by CMake",
+ mf.AddCacheDefinition(name, value, "Value Computed by CMake",
cmStateEnums::STATIC);
}
}