MCPcopy Create free account
hub / github.com/Kitware/CMake / LoadCache

Method LoadCache

Source/cmake.cxx:3356–3377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3354}
3355
3356int cmake::LoadCache()
3357{
3358 // could we not read the cache
3359 if (!this->LoadCache(this->GetHomeOutputDirectory())) {
3360 // if it does exist, but isn't readable then warn the user
3361 std::string cacheFile =
3362 cmStrCat(this->GetHomeOutputDirectory(), "/CMakeCache.txt");
3363 if (cmSystemTools::FileExists(cacheFile)) {
3364 cmSystemTools::Error(
3365 "There is a CMakeCache.txt file for the current binary tree but "
3366 "cmake does not have permission to read it. Please check the "
3367 "permissions of the directory you are trying to run CMake on.");
3368 return -1;
3369 }
3370 }
3371
3372 // setup CMAKE_ROOT and CMAKE_COMMAND
3373 if (!this->AddCMakePaths()) {
3374 return -3;
3375 }
3376 return 0;
3377}
3378
3379bool cmake::LoadCache(std::string const& path)
3380{

Callers 7

RunMethod · 0.95
BuildMethod · 0.95
OpenMethod · 0.95
TryCompileMethod · 0.45
cmLoadCacheCommandFunction · 0.45

Calls 5

AddCMakePathsMethod · 0.95
UnwatchUnusedCliMethod · 0.95
cmStrCatFunction · 0.70
ErrorClass · 0.70
FileExistsFunction · 0.50

Tested by

no test coverage detected