Always cache entries through the cmake instance.
This commit is contained in:
parent
2afadb0d5a
commit
e0f740f1b1
|
@ -1908,13 +1908,13 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
|
||||||
nvalue += files[cc];
|
nvalue += files[cc];
|
||||||
}
|
}
|
||||||
|
|
||||||
this->GetState()->AddCacheEntry(name, nvalue.c_str(), doc, type);
|
this->GetCMakeInstance()->AddCacheEntry(name, nvalue.c_str(), doc, type);
|
||||||
val = this->GetState()->GetInitializedCacheValue(name);
|
val = this->GetState()->GetInitializedCacheValue(name);
|
||||||
haveVal = true;
|
haveVal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
this->GetState()->AddCacheEntry(name, haveVal ? val.c_str() : 0,
|
this->GetCMakeInstance()->AddCacheEntry(name, haveVal ? val.c_str() : 0,
|
||||||
doc, type);
|
doc, type);
|
||||||
// if there was a definition then remove it
|
// if there was a definition then remove it
|
||||||
this->StateSnapshot.RemoveDefinition(name);
|
this->StateSnapshot.RemoveDefinition(name);
|
||||||
|
|
|
@ -39,7 +39,8 @@ bool cmMarkAsAdvancedCommand
|
||||||
cmState* state = this->Makefile->GetState();
|
cmState* state = this->Makefile->GetState();
|
||||||
if (!state->GetCacheEntryValue(variable))
|
if (!state->GetCacheEntryValue(variable))
|
||||||
{
|
{
|
||||||
state->AddCacheEntry(variable, 0, 0, cmState::UNINITIALIZED);
|
this->Makefile->GetCMakeInstance()->AddCacheEntry(
|
||||||
|
variable, 0, 0, cmState::UNINITIALIZED);
|
||||||
overwrite = true;
|
overwrite = true;
|
||||||
}
|
}
|
||||||
if (!state->GetCacheEntryValue(variable))
|
if (!state->GetCacheEntryValue(variable))
|
||||||
|
|
Loading…
Reference in New Issue