diff options
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r-- | Source/cmCacheManager.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 17369c8..b9d1f66 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -118,13 +118,13 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal, } this->CacheMajorVersion = 0; this->CacheMinorVersion = 0; - if (cmProp cmajor = + if (cmValue cmajor = this->GetInitializedCacheValue("CMAKE_CACHE_MAJOR_VERSION")) { unsigned int v = 0; if (sscanf(cmajor->c_str(), "%u", &v) == 1) { this->CacheMajorVersion = v; } - if (cmProp cminor = + if (cmValue cminor = this->GetInitializedCacheValue("CMAKE_CACHE_MINOR_VERSION")) { if (sscanf(cminor->c_str(), "%u", &v) == 1) { this->CacheMinorVersion = v; @@ -144,7 +144,7 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal, } // check to make sure the cache directory has not // been moved - cmProp oldDir = this->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR"); + cmValue oldDir = this->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR"); if (internal && oldDir) { std::string currentcwd = path; std::string oldcwd = *oldDir; @@ -152,7 +152,7 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal, currentcwd += "/CMakeCache.txt"; oldcwd += "/CMakeCache.txt"; if (!cmSystemTools::SameFile(oldcwd, currentcwd)) { - cmProp dir = this->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR"); + cmValue dir = this->GetInitializedCacheValue("CMAKE_CACHEFILE_DIR"); std::ostringstream message; message << "The current CMakeCache.txt directory " << currentcwd << " is different than the directory " << (dir ? *dir : "") @@ -203,7 +203,7 @@ void cmCacheManager::WritePropertyEntries(std::ostream& os, cmMessenger* messenger) const { for (const char* p : cmCacheManager::PersistentProperties) { - if (cmProp value = e.GetProperty(p)) { + if (cmValue value = e.GetProperty(p)) { std::string helpstring = cmStrCat(p, " property for variable: ", entryKey); cmCacheManager::OutputHelpString(os, helpstring); @@ -296,7 +296,7 @@ bool cmCacheManager::SaveCache(const std::string& path, cmMessenger* messenger) */ } else if (t != cmStateEnums::INTERNAL) { // Format is key:type=value - if (cmProp help = ce.GetProperty("HELPSTRING")) { + if (cmValue help = ce.GetProperty("HELPSTRING")) { cmCacheManager::OutputHelpString(fout, *help); } else { cmCacheManager::OutputHelpString(fout, "Missing description"); @@ -326,7 +326,7 @@ bool cmCacheManager::SaveCache(const std::string& path, cmMessenger* messenger) this->WritePropertyEntries(fout, i.first, i.second, messenger); if (t == cmStateEnums::INTERNAL) { // Format is key:type=value - if (cmProp help = i.second.GetProperty("HELPSTRING")) { + if (cmValue help = i.second.GetProperty("HELPSTRING")) { cmCacheManager::OutputHelpString(fout, *help); } cmCacheManager::OutputKey(fout, i.first); @@ -496,11 +496,11 @@ const cmCacheManager::CacheEntry* cmCacheManager::GetCacheEntry( return nullptr; } -cmProp cmCacheManager::GetInitializedCacheValue(const std::string& key) const +cmValue cmCacheManager::GetInitializedCacheValue(const std::string& key) const { if (const auto* entry = this->GetCacheEntry(key)) { if (entry->Initialized) { - return cmProp(entry->GetValue()); + return cmValue(entry->GetValue()); } } return nullptr; @@ -521,7 +521,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const "=================================================\n"; } -void cmCacheManager::AddCacheEntry(const std::string& key, cmProp value, +void cmCacheManager::AddCacheEntry(const std::string& key, cmValue value, const char* helpString, cmStateEnums::CacheEntryType type) { @@ -550,7 +550,7 @@ void cmCacheManager::AddCacheEntry(const std::string& key, cmProp value, : "(This variable does not exist and should not be used)"); } -void cmCacheManager::CacheEntry::SetValue(cmProp value) +void cmCacheManager::CacheEntry::SetValue(cmValue value) { if (value) { this->Value = *value; @@ -565,13 +565,13 @@ std::vector<std::string> cmCacheManager::CacheEntry::GetPropertyList() const return this->Properties.GetKeys(); } -cmProp cmCacheManager::CacheEntry::GetProperty(const std::string& prop) const +cmValue cmCacheManager::CacheEntry::GetProperty(const std::string& prop) const { if (prop == "TYPE") { - return cmProp(cmState::CacheEntryTypeToString(this->Type)); + return cmValue(cmState::CacheEntryTypeToString(this->Type)); } if (prop == "VALUE") { - return cmProp(this->Value); + return cmValue(this->Value); } return this->Properties.GetPropertyValue(prop); } |