mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 22:31:18 -05:00
Port to cmState.
This commit is contained in:
@@ -453,7 +453,7 @@ bool cmSetPropertyCommand::HandleCacheMode()
|
||||
cmMakefile* mf = this->GetMakefile();
|
||||
cmake* cm = mf->GetCMakeInstance();
|
||||
const char* existingValue
|
||||
= cm->GetCacheManager()->GetCacheEntryValue(*ni);
|
||||
= cm->GetState()->GetCacheEntryValue(*ni);
|
||||
if(existingValue)
|
||||
{
|
||||
if(!this->HandleCacheEntry(*ni))
|
||||
@@ -479,20 +479,19 @@ bool cmSetPropertyCommand::HandleCacheEntry(std::string const& cacheKey)
|
||||
// Set or append the property.
|
||||
const char* name = this->PropertyName.c_str();
|
||||
const char* value = this->PropertyValue.c_str();
|
||||
cmCacheManager* manager = this->Makefile->GetCacheManager();
|
||||
cmState* state = this->Makefile->GetState();
|
||||
if (this->Remove)
|
||||
{
|
||||
manager->RemoveCacheEntryProperty(cacheKey, name);
|
||||
return true;
|
||||
state->RemoveCacheEntryProperty(cacheKey, name);
|
||||
}
|
||||
if(this->AppendMode)
|
||||
{
|
||||
manager->AppendCacheEntryProperty(cacheKey, name, value,
|
||||
this->AppendAsString);
|
||||
state->AppendCacheEntryProperty(cacheKey, name, value,
|
||||
this->AppendAsString);
|
||||
}
|
||||
else
|
||||
{
|
||||
manager->SetCacheEntryProperty(cacheKey, name, value);
|
||||
state->SetCacheEntryProperty(cacheKey, name, value);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user