| 3354 | } |
| 3355 | |
| 3356 | int 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 | |
| 3379 | bool cmake::LoadCache(std::string const& path) |
| 3380 | { |
no test coverage detected