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

Method ActualConfigure

Source/cmake.cxx:2461–2807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2459}
2460
2461int cmake::ActualConfigure()
2462{
2463 // Construct right now our path conversion table before it's too late:
2464 this->CleanupCommandsAndMacros();
2465
2466 cmSystemTools::RemoveADirectory(this->GetHomeOutputDirectory() +
2467 "/CMakeFiles/CMakeScratch");
2468
2469 std::string cmlNameCache =
2470 this->State->GetInitializedCacheValue("CMAKE_LIST_FILE_NAME");
2471 if (!cmlNameCache.empty() && !this->CMakeListName.empty() &&
2472 cmlNameCache != this->CMakeListName) {
2473 std::string message =
2474 cmStrCat("CMakeLists filename : \"", this->CMakeListName,
2475 "\"\nDoes not match the previous: \"", cmlNameCache,
2476 "\"\nEither remove the CMakeCache.txt file and CMakeFiles "
2477 "directory or choose a different binary directory.");
2478 cmSystemTools::Error(message);
2479 return -2;
2480 }
2481 if (this->CMakeListName.empty()) {
2482 this->CMakeListName =
2483 cmlNameCache.empty() ? "CMakeLists.txt" : cmlNameCache;
2484 }
2485 if (this->CMakeListName != "CMakeLists.txt") {
2486 this->IssueMessage(
2487 MessageType::WARNING,
2488 "This project has been configured with a project file other than "
2489 "CMakeLists.txt. This feature is intended for temporary use during "
2490 "development and not for publication of a final product.");
2491 }
2492 this->AddCacheEntry("CMAKE_LIST_FILE_NAME", this->CMakeListName,
2493 "Name of CMakeLists files to read",
2494 cmStateEnums::INTERNAL);
2495
2496 int res = this->DoPreConfigureChecks();
2497 if (res < 0) {
2498 return -2;
2499 }
2500 if (!res) {
2501 this->AddCacheEntry(
2502 "CMAKE_HOME_DIRECTORY", this->GetHomeDirectory(),
2503 "Source directory with the top level CMakeLists.txt file for this "
2504 "project",
2505 cmStateEnums::INTERNAL);
2506 }
2507
2508 // We want to create the package redirects directory as early as possible,
2509 // but not before pre-configure checks have passed. This ensures we get
2510 // errors about inappropriate source/binary directories first.
2511 auto const redirectsDir =
2512 cmStrCat(this->GetHomeOutputDirectory(), "/CMakeFiles/pkgRedirects");
2513 cmSystemTools::RemoveADirectory(redirectsDir);
2514 if (!cmSystemTools::MakeDirectory(redirectsDir)) {
2515 cmSystemTools::Error(
2516 cmStrCat("Unable to (re)create the private pkgRedirects directory:\n ",
2517 redirectsDir,
2518 "\n"

Callers 1

ConfigureMethod · 0.95

Calls 15

IssueMessageMethod · 0.95
AddCacheEntryMethod · 0.95
DoPreConfigureChecksMethod · 0.95
CreateGlobalGeneratorMethod · 0.95
GetIsInTryCompileMethod · 0.95
InitializeFileAPIMethod · 0.95
TruncateOutputLogMethod · 0.95
UpdateProgressMethod · 0.95
SaveCacheMethod · 0.95

Tested by

no test coverage detected