mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 23:00:50 +08:00
Source: Reuse some existing variable declarations
This commit is contained in:

committed by
Brad King

parent
40ee764c09
commit
f64a774b49
@@ -2138,12 +2138,10 @@ int cmake::DoPreConfigureChecks()
|
|||||||
std::string cacheStart =
|
std::string cacheStart =
|
||||||
cmStrCat(*this->State->GetInitializedCacheValue("CMAKE_HOME_DIRECTORY"),
|
cmStrCat(*this->State->GetInitializedCacheValue("CMAKE_HOME_DIRECTORY"),
|
||||||
"/CMakeLists.txt");
|
"/CMakeLists.txt");
|
||||||
std::string currentStart =
|
if (!cmSystemTools::SameFile(cacheStart, srcList)) {
|
||||||
cmStrCat(this->GetHomeDirectory(), "/CMakeLists.txt");
|
|
||||||
if (!cmSystemTools::SameFile(cacheStart, currentStart)) {
|
|
||||||
std::string message =
|
std::string message =
|
||||||
cmStrCat("The source \"", currentStart,
|
cmStrCat("The source \"", srcList, "\" does not match the source \"",
|
||||||
"\" does not match the source \"", cacheStart,
|
cacheStart,
|
||||||
"\" used to generate cache. Re-run cmake with a different "
|
"\" used to generate cache. Re-run cmake with a different "
|
||||||
"source directory.");
|
"source directory.");
|
||||||
cmSystemTools::Error(message);
|
cmSystemTools::Error(message);
|
||||||
@@ -2380,7 +2378,7 @@ int cmake::ActualConfigure()
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!this->State->GetInitializedCacheValue("CMAKE_GENERATOR")) {
|
if (!genName) {
|
||||||
this->AddCacheEntry("CMAKE_GENERATOR", this->GlobalGenerator->GetName(),
|
this->AddCacheEntry("CMAKE_GENERATOR", this->GlobalGenerator->GetName(),
|
||||||
"Name of generator.", cmStateEnums::INTERNAL);
|
"Name of generator.", cmStateEnums::INTERNAL);
|
||||||
this->AddCacheEntry(
|
this->AddCacheEntry(
|
||||||
|
Reference in New Issue
Block a user