summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorShane Parris <shane.lee.parris@gmail.com>2018-02-13 17:33:49 (GMT)
committerShane Parris <shane.lee.parris@gmail.com>2018-02-28 14:34:47 (GMT)
commitf93cc4158e0df5f7cc39c97e275bdc58c54698bd (patch)
treec27a4945cfab99aa935f02007dc4b9b2bfb0070c /Source/cmCacheManager.cxx
parent915b71010c1c48ccd8e84df825579dd5595afc9a (diff)
downloadCMake-f93cc4158e0df5f7cc39c97e275bdc58c54698bd.zip
CMake-f93cc4158e0df5f7cc39c97e275bdc58c54698bd.tar.gz
CMake-f93cc4158e0df5f7cc39c97e275bdc58c54698bd.tar.bz2
Refactor cmCacheManager::LoadCache to use ostringstream
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index fab2445..85ac985 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -160,14 +160,14 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal,
currentcwd += "/CMakeCache.txt";
oldcwd += "/CMakeCache.txt";
if (!cmSystemTools::SameFile(oldcwd, currentcwd)) {
- std::string message =
- std::string("The current CMakeCache.txt directory ") + currentcwd +
- std::string(" is different than the directory ") +
- std::string(this->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR")) +
- std::string(" where CMakeCache.txt was created. This may result "
- "in binaries being created in the wrong place. If you "
- "are not sure, reedit the CMakeCache.txt");
- cmSystemTools::Error(message.c_str());
+ std::ostringstream message;
+ message << "The current CMakeCache.txt directory " << currentcwd
+ << " is different than the directory "
+ << this->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR")
+ << " where CMakeCache.txt was created. This may result "
+ "in binaries being created in the wrong place. If you "
+ "are not sure, reedit the CMakeCache.txt";
+ cmSystemTools::Error(message.str().c_str());
}
}
return true;