summaryrefslogtreecommitdiffstats
path: root/Source/cmServerProtocol.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2018-09-10 13:31:48 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2018-09-10 13:31:48 (GMT)
commit13d10ee61642ab384d506fa81a991e51d90c6488 (patch)
tree3ab63ba839614280a3a9c6b5e37827b46bc24b33 /Source/cmServerProtocol.cxx
parent11de1492d3d96f4527990aee212cd94c944c6f64 (diff)
downloadCMake-13d10ee61642ab384d506fa81a991e51d90c6488.zip
CMake-13d10ee61642ab384d506fa81a991e51d90c6488.tar.gz
CMake-13d10ee61642ab384d506fa81a991e51d90c6488.tar.bz2
cmState::GetInitializedCacheValue: Return as const std::string*
Diffstat (limited to 'Source/cmServerProtocol.cxx')
-rw-r--r--Source/cmServerProtocol.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index af4b466..0ed3953 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -1340,20 +1340,20 @@ cmServerResponse cmServerProtocol1::ProcessConfigure(
if (cm->LoadCache(buildDir)) {
// build directory has been set up before
- const char* cachedSourceDir =
+ const std::string* cachedSourceDir =
cm->GetState()->GetInitializedCacheValue("CMAKE_HOME_DIRECTORY");
if (!cachedSourceDir) {
return request.ReportError("No CMAKE_HOME_DIRECTORY found in cache.");
}
if (sourceDir.empty()) {
- sourceDir = std::string(cachedSourceDir);
+ sourceDir = *cachedSourceDir;
cm->SetHomeDirectory(sourceDir);
}
- const char* cachedGenerator =
+ const std::string* cachedGenerator =
cm->GetState()->GetInitializedCacheValue("CMAKE_GENERATOR");
if (cachedGenerator) {
- if (gg && gg->GetName() != cachedGenerator) {
+ if (gg && gg->GetName() != *cachedGenerator) {
return request.ReportError("Configured generator does not match with "
"CMAKE_GENERATOR found in cache.");
}