summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMeekness Adesina <zenon8adams@gmail.com>2023-05-18 21:09:55 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-19 12:58:57 (GMT)
commitf64a774b49baaba40056edd8c5f8eb97292dd7d0 (patch)
tree3577814e18c86163e35a9f6a714681b783d32e7f /Source
parent40ee764c09673bf1e5e66906f011a7eda962336e (diff)
downloadCMake-f64a774b49baaba40056edd8c5f8eb97292dd7d0.zip
CMake-f64a774b49baaba40056edd8c5f8eb97292dd7d0.tar.gz
CMake-f64a774b49baaba40056edd8c5f8eb97292dd7d0.tar.bz2
Source: Reuse some existing variable declarations
Diffstat (limited to 'Source')
-rw-r--r--Source/cmake.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 623478e..c217f58 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2138,12 +2138,10 @@ int cmake::DoPreConfigureChecks()
std::string cacheStart =
cmStrCat(*this->State->GetInitializedCacheValue("CMAKE_HOME_DIRECTORY"),
"/CMakeLists.txt");
- std::string currentStart =
- cmStrCat(this->GetHomeDirectory(), "/CMakeLists.txt");
- if (!cmSystemTools::SameFile(cacheStart, currentStart)) {
+ if (!cmSystemTools::SameFile(cacheStart, srcList)) {
std::string message =
- cmStrCat("The source \"", currentStart,
- "\" does not match the source \"", cacheStart,
+ cmStrCat("The source \"", srcList, "\" does not match the source \"",
+ cacheStart,
"\" used to generate cache. Re-run cmake with a different "
"source directory.");
cmSystemTools::Error(message);
@@ -2380,7 +2378,7 @@ int cmake::ActualConfigure()
return -2;
}
}
- if (!this->State->GetInitializedCacheValue("CMAKE_GENERATOR")) {
+ if (!genName) {
this->AddCacheEntry("CMAKE_GENERATOR", this->GlobalGenerator->GetName(),
"Name of generator.", cmStateEnums::INTERNAL);
this->AddCacheEntry(