diff options
author | Brad King <brad.king@kitware.com> | 2018-09-12 13:38:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-09-12 13:38:37 (GMT) |
commit | 708b3fecfe4ea4f92f49bb5eea5c9eed370a5956 (patch) | |
tree | 50c7e6cf706b03cf6364776a3b2d5d920e24164a /Source/cmServerProtocol.cxx | |
parent | 1c1a1e08e82626aaf53ec0285ff4eabdb75d6d71 (diff) | |
parent | 13d10ee61642ab384d506fa81a991e51d90c6488 (diff) | |
download | CMake-708b3fecfe4ea4f92f49bb5eea5c9eed370a5956.zip CMake-708b3fecfe4ea4f92f49bb5eea5c9eed370a5956.tar.gz CMake-708b3fecfe4ea4f92f49bb5eea5c9eed370a5956.tar.bz2 |
Merge topic 'gicv-stdstring'
13d10ee616 cmState::GetInitializedCacheValue: Return as const std::string*
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2365
Diffstat (limited to 'Source/cmServerProtocol.cxx')
-rw-r--r-- | Source/cmServerProtocol.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 231cacb..2cad657 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -1339,20 +1339,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."); } |