cmState: Move CacheEntryType enum to separate namespace
Port dependent code to the change.
This commit is contained in:
parent
a49751fb2e
commit
2fe3e55d53
@ -11,7 +11,7 @@ cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left,
|
||||
int top)
|
||||
: cmCursesWidget(width, height, left, top)
|
||||
{
|
||||
this->Type = cmState::BOOL;
|
||||
this->Type = cmStateEnums::BOOL;
|
||||
set_field_fore(this->Field, A_NORMAL);
|
||||
set_field_back(this->Field, A_STANDOUT);
|
||||
field_opts_off(this->Field, O_STATIC);
|
||||
|
@ -47,7 +47,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
|
||||
const char* value = cm->GetState()->GetCacheEntryValue(key);
|
||||
assert(value);
|
||||
switch (cm->GetState()->GetCacheEntryType(key)) {
|
||||
case cmState::BOOL:
|
||||
case cmStateEnums::BOOL:
|
||||
this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1);
|
||||
if (cmSystemTools::IsOn(value)) {
|
||||
static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(true);
|
||||
@ -55,15 +55,15 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
|
||||
static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(false);
|
||||
}
|
||||
break;
|
||||
case cmState::PATH:
|
||||
case cmStateEnums::PATH:
|
||||
this->Entry = new cmCursesPathWidget(this->EntryWidth, 1, 1, 1);
|
||||
static_cast<cmCursesPathWidget*>(this->Entry)->SetString(value);
|
||||
break;
|
||||
case cmState::FILEPATH:
|
||||
case cmStateEnums::FILEPATH:
|
||||
this->Entry = new cmCursesFilePathWidget(this->EntryWidth, 1, 1, 1);
|
||||
static_cast<cmCursesFilePathWidget*>(this->Entry)->SetString(value);
|
||||
break;
|
||||
case cmState::STRING: {
|
||||
case cmStateEnums::STRING: {
|
||||
const char* stringsProp =
|
||||
cm->GetState()->GetCacheEntryProperty(key, "STRINGS");
|
||||
if (stringsProp) {
|
||||
@ -83,7 +83,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
|
||||
}
|
||||
break;
|
||||
}
|
||||
case cmState::UNINITIALIZED:
|
||||
case cmStateEnums::UNINITIALIZED:
|
||||
cmSystemTools::Error("Found an undefined variable: ", key.c_str());
|
||||
break;
|
||||
default:
|
||||
|
@ -9,7 +9,7 @@ cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left,
|
||||
int top)
|
||||
: cmCursesWidget(width, height, left, top)
|
||||
{
|
||||
this->Type = cmState::INTERNAL;
|
||||
this->Type = cmStateEnums::INTERNAL;
|
||||
}
|
||||
|
||||
bool cmCursesDummyWidget::HandleInput(int& /*key*/, cmCursesMainForm* /*fm*/,
|
||||
|
@ -9,5 +9,5 @@ cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left,
|
||||
int top)
|
||||
: cmCursesPathWidget(width, height, left, top)
|
||||
{
|
||||
this->Type = cmState::FILEPATH;
|
||||
this->Type = cmStateEnums::FILEPATH;
|
||||
}
|
||||
|
@ -106,10 +106,10 @@ void cmCursesMainForm::InitializeUI()
|
||||
|
||||
for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
|
||||
it != cacheKeys.end(); ++it) {
|
||||
cmState::CacheEntryType t =
|
||||
cmStateEnums::CacheEntryType t =
|
||||
this->CMakeInstance->GetState()->GetCacheEntryType(*it);
|
||||
if (t != cmState::INTERNAL && t != cmState::STATIC &&
|
||||
t != cmState::UNINITIALIZED) {
|
||||
if (t != cmStateEnums::INTERNAL && t != cmStateEnums::STATIC &&
|
||||
t != cmStateEnums::UNINITIALIZED) {
|
||||
++count;
|
||||
}
|
||||
}
|
||||
@ -130,10 +130,10 @@ void cmCursesMainForm::InitializeUI()
|
||||
for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
|
||||
it != cacheKeys.end(); ++it) {
|
||||
std::string key = *it;
|
||||
cmState::CacheEntryType t =
|
||||
cmStateEnums::CacheEntryType t =
|
||||
this->CMakeInstance->GetState()->GetCacheEntryType(*it);
|
||||
if (t == cmState::INTERNAL || t == cmState::STATIC ||
|
||||
t == cmState::UNINITIALIZED) {
|
||||
if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC ||
|
||||
t == cmStateEnums::UNINITIALIZED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -148,10 +148,10 @@ void cmCursesMainForm::InitializeUI()
|
||||
for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
|
||||
it != cacheKeys.end(); ++it) {
|
||||
std::string key = *it;
|
||||
cmState::CacheEntryType t =
|
||||
cmStateEnums::CacheEntryType t =
|
||||
this->CMakeInstance->GetState()->GetCacheEntryType(*it);
|
||||
if (t == cmState::INTERNAL || t == cmState::STATIC ||
|
||||
t == cmState::UNINITIALIZED) {
|
||||
if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC ||
|
||||
t == cmStateEnums::UNINITIALIZED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -249,8 +249,9 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
|
||||
cmCursesWidget* cw =
|
||||
reinterpret_cast<cmCursesWidget*>(field_userptr(currentField));
|
||||
// If in edit mode, get out of it
|
||||
if (cw->GetType() == cmState::STRING || cw->GetType() == cmState::PATH ||
|
||||
cw->GetType() == cmState::FILEPATH) {
|
||||
if (cw->GetType() == cmStateEnums::STRING ||
|
||||
cw->GetType() == cmStateEnums::PATH ||
|
||||
cw->GetType() == cmStateEnums::FILEPATH) {
|
||||
cmCursesStringWidget* sw = static_cast<cmCursesStringWidget*>(cw);
|
||||
sw->SetInEdit(false);
|
||||
}
|
||||
@ -704,7 +705,7 @@ void cmCursesMainForm::FillCacheManagerFromUI()
|
||||
std::string newValue = (*this->Entries)[i]->Entry->GetValue();
|
||||
std::string fixedOldValue;
|
||||
std::string fixedNewValue;
|
||||
cmState::CacheEntryType t =
|
||||
cmStateEnums::CacheEntryType t =
|
||||
this->CMakeInstance->GetState()->GetCacheEntryType(cacheKey);
|
||||
this->FixValue(t, oldValue, fixedOldValue);
|
||||
this->FixValue(t, newValue, fixedNewValue);
|
||||
@ -720,14 +721,14 @@ void cmCursesMainForm::FillCacheManagerFromUI()
|
||||
}
|
||||
}
|
||||
|
||||
void cmCursesMainForm::FixValue(cmState::CacheEntryType type,
|
||||
void cmCursesMainForm::FixValue(cmStateEnums::CacheEntryType type,
|
||||
const std::string& in, std::string& out) const
|
||||
{
|
||||
out = in.substr(0, in.find_last_not_of(' ') + 1);
|
||||
if (type == cmState::PATH || type == cmState::FILEPATH) {
|
||||
if (type == cmStateEnums::PATH || type == cmStateEnums::FILEPATH) {
|
||||
cmSystemTools::ConvertToUnixSlashes(out);
|
||||
}
|
||||
if (type == cmState::BOOL) {
|
||||
if (type == cmStateEnums::BOOL) {
|
||||
if (cmSystemTools::IsOff(out.c_str())) {
|
||||
out = "OFF";
|
||||
} else {
|
||||
|
@ -110,7 +110,7 @@ protected:
|
||||
// cache.
|
||||
void FillCacheManagerFromUI();
|
||||
// Fix formatting of values to a consistent form.
|
||||
void FixValue(cmState::CacheEntryType type, const std::string& in,
|
||||
void FixValue(cmStateEnums::CacheEntryType type, const std::string& in,
|
||||
std::string& out) const;
|
||||
// Re-post the existing fields. Used to toggle between
|
||||
// normal and advanced modes. Render() should be called
|
||||
|
@ -11,7 +11,7 @@ cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height, int left,
|
||||
int top)
|
||||
: cmCursesWidget(width, height, left, top)
|
||||
{
|
||||
this->Type = cmState::BOOL; // this is a bit of a hack
|
||||
this->Type = cmStateEnums::BOOL; // this is a bit of a hack
|
||||
// there is no option type, and string type causes ccmake to cast
|
||||
// the widget into a string widget at some point. BOOL is safe for
|
||||
// now.
|
||||
|
@ -13,7 +13,7 @@ cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left,
|
||||
int top)
|
||||
: cmCursesStringWidget(width, height, left, top)
|
||||
{
|
||||
this->Type = cmState::PATH;
|
||||
this->Type = cmStateEnums::PATH;
|
||||
this->Cycle = false;
|
||||
this->CurrentIndex = 0;
|
||||
}
|
||||
@ -50,7 +50,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
|
||||
std::vector<std::string> dirs;
|
||||
|
||||
cmSystemTools::SimpleGlob(glob, dirs,
|
||||
(this->Type == cmState::PATH ? -1 : 0));
|
||||
(this->Type == cmStateEnums::PATH ? -1 : 0));
|
||||
if (this->CurrentIndex < dirs.size()) {
|
||||
cstr = dirs[this->CurrentIndex];
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ cmCursesStringWidget::cmCursesStringWidget(int width, int height, int left,
|
||||
: cmCursesWidget(width, height, left, top)
|
||||
{
|
||||
this->InEdit = false;
|
||||
this->Type = cmState::STRING;
|
||||
this->Type = cmStateEnums::STRING;
|
||||
set_field_fore(this->Field, A_NORMAL);
|
||||
set_field_back(this->Field, A_STANDOUT);
|
||||
field_opts_off(this->Field, O_STATIC);
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
/**
|
||||
* Get the type of the widget (STRING, PATH etc...)
|
||||
*/
|
||||
cmState::CacheEntryType GetType() { return this->Type; }
|
||||
cmStateEnums::CacheEntryType GetType() { return this->Type; }
|
||||
|
||||
/**
|
||||
* If there are any, print the widget specific commands
|
||||
@ -62,7 +62,7 @@ protected:
|
||||
cmCursesWidget(const cmCursesWidget& from);
|
||||
void operator=(const cmCursesWidget&);
|
||||
|
||||
cmState::CacheEntryType Type;
|
||||
cmStateEnums::CacheEntryType Type;
|
||||
std::string Value;
|
||||
FIELD* Field;
|
||||
// The page in the main form this widget is in
|
||||
|
@ -196,8 +196,8 @@ void QCMake::setProperties(const QCMakePropertyList& newProps)
|
||||
std::vector<std::string> cacheKeys = state->GetCacheEntryKeys();
|
||||
for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
|
||||
it != cacheKeys.end(); ++it) {
|
||||
cmState::CacheEntryType t = state->GetCacheEntryType(*it);
|
||||
if (t == cmState::INTERNAL || t == cmState::STATIC) {
|
||||
cmStateEnums::CacheEntryType t = state->GetCacheEntryType(*it);
|
||||
if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -232,19 +232,19 @@ void QCMake::setProperties(const QCMakePropertyList& newProps)
|
||||
if (s.Type == QCMakeProperty::BOOL) {
|
||||
this->CMakeInstance->AddCacheEntry(
|
||||
s.Key.toLocal8Bit().data(), s.Value.toBool() ? "ON" : "OFF",
|
||||
s.Help.toLocal8Bit().data(), cmState::BOOL);
|
||||
s.Help.toLocal8Bit().data(), cmStateEnums::BOOL);
|
||||
} else if (s.Type == QCMakeProperty::STRING) {
|
||||
this->CMakeInstance->AddCacheEntry(
|
||||
s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
|
||||
s.Help.toLocal8Bit().data(), cmState::STRING);
|
||||
s.Help.toLocal8Bit().data(), cmStateEnums::STRING);
|
||||
} else if (s.Type == QCMakeProperty::PATH) {
|
||||
this->CMakeInstance->AddCacheEntry(
|
||||
s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
|
||||
s.Help.toLocal8Bit().data(), cmState::PATH);
|
||||
s.Help.toLocal8Bit().data(), cmStateEnums::PATH);
|
||||
} else if (s.Type == QCMakeProperty::FILEPATH) {
|
||||
this->CMakeInstance->AddCacheEntry(
|
||||
s.Key.toLocal8Bit().data(), s.Value.toString().toLocal8Bit().data(),
|
||||
s.Help.toLocal8Bit().data(), cmState::FILEPATH);
|
||||
s.Help.toLocal8Bit().data(), cmStateEnums::FILEPATH);
|
||||
}
|
||||
}
|
||||
|
||||
@ -259,9 +259,9 @@ QCMakePropertyList QCMake::properties() const
|
||||
std::vector<std::string> cacheKeys = state->GetCacheEntryKeys();
|
||||
for (std::vector<std::string>::const_iterator i = cacheKeys.begin();
|
||||
i != cacheKeys.end(); ++i) {
|
||||
cmState::CacheEntryType t = state->GetCacheEntryType(*i);
|
||||
if (t == cmState::INTERNAL || t == cmState::STATIC ||
|
||||
t == cmState::UNINITIALIZED) {
|
||||
cmStateEnums::CacheEntryType t = state->GetCacheEntryType(*i);
|
||||
if (t == cmStateEnums::INTERNAL || t == cmStateEnums::STATIC ||
|
||||
t == cmStateEnums::UNINITIALIZED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -273,14 +273,14 @@ QCMakePropertyList QCMake::properties() const
|
||||
QString::fromLocal8Bit(state->GetCacheEntryProperty(*i, "HELPSTRING"));
|
||||
prop.Value = QString::fromLocal8Bit(cachedValue);
|
||||
prop.Advanced = state->GetCacheEntryPropertyAsBool(*i, "ADVANCED");
|
||||
if (t == cmState::BOOL) {
|
||||
if (t == cmStateEnums::BOOL) {
|
||||
prop.Type = QCMakeProperty::BOOL;
|
||||
prop.Value = cmSystemTools::IsOn(cachedValue);
|
||||
} else if (t == cmState::PATH) {
|
||||
} else if (t == cmStateEnums::PATH) {
|
||||
prop.Type = QCMakeProperty::PATH;
|
||||
} else if (t == cmState::FILEPATH) {
|
||||
} else if (t == cmStateEnums::FILEPATH) {
|
||||
prop.Type = QCMakeProperty::FILEPATH;
|
||||
} else if (t == cmState::STRING) {
|
||||
} else if (t == cmStateEnums::STRING) {
|
||||
prop.Type = QCMakeProperty::STRING;
|
||||
const char* stringsProperty =
|
||||
state->GetCacheEntryProperty(*i, "STRINGS");
|
||||
|
@ -116,6 +116,6 @@ bool cmBuildCommand::TwoArgsSignature(std::vector<std::string> const& args)
|
||||
this->Makefile->AddCacheDefinition(define, makecommand.c_str(),
|
||||
"Command used to build entire project "
|
||||
"from the command line.",
|
||||
cmState::STRING);
|
||||
cmStateEnums::STRING);
|
||||
return true;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args,
|
||||
std::replace(cv.begin(), cv.end(), '(', '_');
|
||||
std::replace(cv.begin(), cv.end(), ')', '_');
|
||||
this->Makefile->AddCacheDefinition(args[0], cv.c_str(), "Name of build.",
|
||||
cmState::STRING);
|
||||
cmStateEnums::STRING);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -53,6 +53,6 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args,
|
||||
std::replace(buildname.begin(), buildname.end(), ')', '_');
|
||||
|
||||
this->Makefile->AddCacheDefinition(args[0], buildname.c_str(),
|
||||
"Name of build.", cmState::STRING);
|
||||
"Name of build.", cmStateEnums::STRING);
|
||||
return true;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ bool cmCMakePolicyCommand::HandleSetMode(std::vector<std::string> const& args)
|
||||
"For backwards compatibility, what version of CMake "
|
||||
"commands and "
|
||||
"syntax should this version of CMake try to support.",
|
||||
cmState::STRING);
|
||||
cmStateEnums::STRING);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -75,22 +75,22 @@ void CCONV cmAddCacheDefinition(void* arg, const char* name, const char* value,
|
||||
|
||||
switch (type) {
|
||||
case CM_CACHE_BOOL:
|
||||
mf->AddCacheDefinition(name, value, doc, cmState::BOOL);
|
||||
mf->AddCacheDefinition(name, value, doc, cmStateEnums::BOOL);
|
||||
break;
|
||||
case CM_CACHE_PATH:
|
||||
mf->AddCacheDefinition(name, value, doc, cmState::PATH);
|
||||
mf->AddCacheDefinition(name, value, doc, cmStateEnums::PATH);
|
||||
break;
|
||||
case CM_CACHE_FILEPATH:
|
||||
mf->AddCacheDefinition(name, value, doc, cmState::FILEPATH);
|
||||
mf->AddCacheDefinition(name, value, doc, cmStateEnums::FILEPATH);
|
||||
break;
|
||||
case CM_CACHE_STRING:
|
||||
mf->AddCacheDefinition(name, value, doc, cmState::STRING);
|
||||
mf->AddCacheDefinition(name, value, doc, cmStateEnums::STRING);
|
||||
break;
|
||||
case CM_CACHE_INTERNAL:
|
||||
mf->AddCacheDefinition(name, value, doc, cmState::INTERNAL);
|
||||
mf->AddCacheDefinition(name, value, doc, cmStateEnums::INTERNAL);
|
||||
break;
|
||||
case CM_CACHE_STATIC:
|
||||
mf->AddCacheDefinition(name, value, doc, cmState::STATIC);
|
||||
mf->AddCacheDefinition(name, value, doc, cmStateEnums::STATIC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1969,7 +1969,7 @@ bool cmCTest::AddVariableDefinition(const std::string& arg)
|
||||
{
|
||||
std::string name;
|
||||
std::string value;
|
||||
cmState::CacheEntryType type = cmState::UNINITIALIZED;
|
||||
cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED;
|
||||
|
||||
if (cmake::ParseCacheEntry(arg, name, value, type)) {
|
||||
this->Definitions[name] = value;
|
||||
|
@ -94,13 +94,13 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal,
|
||||
// If the entry is not internal to the cache being loaded
|
||||
// or if it is in the list of internal entries to be
|
||||
// imported, load it.
|
||||
if (internal || (e.Type != cmState::INTERNAL) ||
|
||||
if (internal || (e.Type != cmStateEnums::INTERNAL) ||
|
||||
(includes.find(entryKey) != includes.end())) {
|
||||
// If we are loading the cache from another project,
|
||||
// make all loaded entries internal so that it is
|
||||
// not visible in the gui
|
||||
if (!internal) {
|
||||
e.Type = cmState::INTERNAL;
|
||||
e.Type = cmStateEnums::INTERNAL;
|
||||
helpString = "DO NOT EDIT, ";
|
||||
helpString += entryKey;
|
||||
helpString += " loaded from external file. "
|
||||
@ -142,11 +142,11 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal,
|
||||
this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", "0",
|
||||
"Minor version of cmake used to create the "
|
||||
"current loaded cache",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", "0",
|
||||
"Major version of cmake used to create the "
|
||||
"current loaded cache",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
// check to make sure the cache directory has not
|
||||
// been moved
|
||||
@ -178,7 +178,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey,
|
||||
CacheEntry& e)
|
||||
{
|
||||
// All property entries are internal.
|
||||
if (e.Type != cmState::INTERNAL) {
|
||||
if (e.Type != cmStateEnums::INTERNAL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey,
|
||||
if (it.IsAtEnd()) {
|
||||
// Create an entry and store the property.
|
||||
CacheEntry& ne = this->Cache[key];
|
||||
ne.Type = cmState::UNINITIALIZED;
|
||||
ne.Type = cmStateEnums::UNINITIALIZED;
|
||||
ne.SetProperty(*p, e.Value.c_str());
|
||||
} else {
|
||||
// Store this property on its entry.
|
||||
@ -244,17 +244,17 @@ bool cmCacheManager::SaveCache(const std::string& path)
|
||||
this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", temp,
|
||||
"Minor version of cmake used to create the "
|
||||
"current loaded cache",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
sprintf(temp, "%d", cmVersion::GetMajorVersion());
|
||||
this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", temp,
|
||||
"Major version of cmake used to create the "
|
||||
"current loaded cache",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
sprintf(temp, "%d", cmVersion::GetPatchVersion());
|
||||
this->AddCacheEntry("CMAKE_CACHE_PATCH_VERSION", temp,
|
||||
"Patch version of cmake used to create the "
|
||||
"current loaded cache",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
|
||||
// Let us store the current working directory so that if somebody
|
||||
// Copies it, he will not be surprised
|
||||
@ -268,7 +268,7 @@ bool cmCacheManager::SaveCache(const std::string& path)
|
||||
this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(),
|
||||
"This is the directory where this CMakeCache.txt"
|
||||
" was created",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
|
||||
/* clang-format off */
|
||||
fout << "# This is the CMakeCache file.\n"
|
||||
@ -301,14 +301,14 @@ bool cmCacheManager::SaveCache(const std::string& path)
|
||||
this->Cache.begin();
|
||||
i != this->Cache.end(); ++i) {
|
||||
const CacheEntry& ce = (*i).second;
|
||||
cmState::CacheEntryType t = ce.Type;
|
||||
cmStateEnums::CacheEntryType t = ce.Type;
|
||||
if (!ce.Initialized) {
|
||||
/*
|
||||
// This should be added in, but is not for now.
|
||||
cmSystemTools::Error("Cache entry \"", (*i).first.c_str(),
|
||||
"\" is uninitialized");
|
||||
*/
|
||||
} else if (t != cmState::INTERNAL) {
|
||||
} else if (t != cmStateEnums::INTERNAL) {
|
||||
// Format is key:type=value
|
||||
if (const char* help = ce.GetProperty("HELPSTRING")) {
|
||||
cmCacheManager::OutputHelpString(fout, help);
|
||||
@ -334,9 +334,9 @@ bool cmCacheManager::SaveCache(const std::string& path)
|
||||
continue;
|
||||
}
|
||||
|
||||
cmState::CacheEntryType t = i.GetType();
|
||||
cmStateEnums::CacheEntryType t = i.GetType();
|
||||
this->WritePropertyEntries(fout, i);
|
||||
if (t == cmState::INTERNAL) {
|
||||
if (t == cmStateEnums::INTERNAL) {
|
||||
// Format is key:type=value
|
||||
if (const char* help = i.GetProperty("HELPSTRING")) {
|
||||
this->OutputHelpString(fout, help);
|
||||
@ -465,7 +465,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const
|
||||
for (std::map<std::string, CacheEntry>::const_iterator i =
|
||||
this->Cache.begin();
|
||||
i != this->Cache.end(); ++i) {
|
||||
if ((*i).second.Type != cmState::INTERNAL) {
|
||||
if ((*i).second.Type != cmStateEnums::INTERNAL) {
|
||||
out << (*i).first << " = " << (*i).second.Value << std::endl;
|
||||
}
|
||||
}
|
||||
@ -477,7 +477,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const
|
||||
|
||||
void cmCacheManager::AddCacheEntry(const std::string& key, const char* value,
|
||||
const char* helpString,
|
||||
cmState::CacheEntryType type)
|
||||
cmStateEnums::CacheEntryType type)
|
||||
{
|
||||
CacheEntry& e = this->Cache[key];
|
||||
if (value) {
|
||||
@ -488,7 +488,7 @@ void cmCacheManager::AddCacheEntry(const std::string& key, const char* value,
|
||||
}
|
||||
e.Type = type;
|
||||
// make sure we only use unix style paths
|
||||
if (type == cmState::FILEPATH || type == cmState::PATH) {
|
||||
if (type == cmStateEnums::FILEPATH || type == cmStateEnums::PATH) {
|
||||
if (e.Value.find(';') != e.Value.npos) {
|
||||
std::vector<std::string> paths;
|
||||
cmSystemTools::ExpandListArgument(e.Value, paths);
|
||||
|
@ -34,7 +34,7 @@ private:
|
||||
struct CacheEntry
|
||||
{
|
||||
std::string Value;
|
||||
cmState::CacheEntryType Type;
|
||||
cmStateEnums::CacheEntryType Type;
|
||||
cmPropertyMap Properties;
|
||||
std::vector<std::string> GetPropertyList() const;
|
||||
const char* GetProperty(const std::string&) const;
|
||||
@ -44,7 +44,7 @@ private:
|
||||
bool Initialized;
|
||||
CacheEntry()
|
||||
: Value("")
|
||||
, Type(cmState::UNINITIALIZED)
|
||||
, Type(cmStateEnums::UNINITIALIZED)
|
||||
, Initialized(false)
|
||||
{
|
||||
}
|
||||
@ -70,8 +70,14 @@ public:
|
||||
const char* GetValue() const { return this->GetEntry().Value.c_str(); }
|
||||
bool GetValueAsBool() const;
|
||||
void SetValue(const char*);
|
||||
cmState::CacheEntryType GetType() const { return this->GetEntry().Type; }
|
||||
void SetType(cmState::CacheEntryType ty) { this->GetEntry().Type = ty; }
|
||||
cmStateEnums::CacheEntryType GetType() const
|
||||
{
|
||||
return this->GetEntry().Type;
|
||||
}
|
||||
void SetType(cmStateEnums::CacheEntryType ty)
|
||||
{
|
||||
this->GetEntry().Type = ty;
|
||||
}
|
||||
bool Initialized() { return this->GetEntry().Initialized; }
|
||||
cmCacheManager& Container;
|
||||
std::map<std::string, CacheEntry>::iterator Position;
|
||||
@ -137,7 +143,7 @@ public:
|
||||
return this->GetCacheIterator(key.c_str()).GetProperty(propName);
|
||||
}
|
||||
|
||||
cmState::CacheEntryType GetCacheEntryType(std::string const& key)
|
||||
cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key)
|
||||
{
|
||||
return this->GetCacheIterator(key.c_str()).GetType();
|
||||
}
|
||||
@ -200,7 +206,8 @@ public:
|
||||
protected:
|
||||
///! Add an entry into the cache
|
||||
void AddCacheEntry(const std::string& key, const char* value,
|
||||
const char* helpString, cmState::CacheEntryType type);
|
||||
const char* helpString,
|
||||
cmStateEnums::CacheEntryType type);
|
||||
|
||||
///! Get a cache entry object for a key
|
||||
CacheEntry* GetCacheEntry(const std::string& key);
|
||||
|
@ -531,7 +531,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
||||
// set the result var to the return value to indicate success or failure
|
||||
this->Makefile->AddCacheDefinition(argv[0], (res == 0 ? "TRUE" : "FALSE"),
|
||||
"Result of TRY_COMPILE",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
|
||||
if (!outputVariable.empty()) {
|
||||
this->Makefile->AddDefinition(outputVariable, output.c_str());
|
||||
|
@ -230,7 +230,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out,
|
||||
// in the cache
|
||||
valueToUse = envVarValue;
|
||||
mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
|
||||
cacheEntryName.c_str(), cmState::STRING, true);
|
||||
cacheEntryName.c_str(), cmStateEnums::STRING, true);
|
||||
mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory());
|
||||
} else if (!envVarSet && cacheValue != CM_NULLPTR) {
|
||||
// It is already in the cache, but not in the env, so use it from the cache
|
||||
@ -245,7 +245,8 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out,
|
||||
if (valueToUse.find(envVarValue) == std::string::npos) {
|
||||
valueToUse = envVarValue;
|
||||
mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
|
||||
cacheEntryName.c_str(), cmState::STRING, true);
|
||||
cacheEntryName.c_str(), cmStateEnums::STRING,
|
||||
true);
|
||||
mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory());
|
||||
}
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ bool cmFindBase::CheckForVariableInCache()
|
||||
// this.
|
||||
if (cached &&
|
||||
state->GetCacheEntryType(this->VariableName) ==
|
||||
cmState::UNINITIALIZED) {
|
||||
cmStateEnums::UNINITIALIZED) {
|
||||
this->AlreadyInCacheWithoutMetaInfo = true;
|
||||
}
|
||||
return true;
|
||||
|
@ -26,7 +26,7 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn,
|
||||
if (this->AlreadyInCacheWithoutMetaInfo) {
|
||||
this->Makefile->AddCacheDefinition(this->VariableName, "",
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmState::FILEPATH);
|
||||
cmStateEnums::FILEPATH);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -52,13 +52,13 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn,
|
||||
// Save the value in the cache
|
||||
this->Makefile->AddCacheDefinition(this->VariableName, library.c_str(),
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmState::FILEPATH);
|
||||
cmStateEnums::FILEPATH);
|
||||
return true;
|
||||
}
|
||||
std::string notfound = this->VariableName + "-NOTFOUND";
|
||||
this->Makefile->AddCacheDefinition(this->VariableName, notfound.c_str(),
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmState::FILEPATH);
|
||||
cmStateEnums::FILEPATH);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -890,7 +890,7 @@ bool cmFindPackageCommand::FindConfig()
|
||||
help += ".";
|
||||
// We force the value since we do not get here if it was already set.
|
||||
this->Makefile->AddCacheDefinition(this->Variable, init.c_str(),
|
||||
help.c_str(), cmState::PATH, true);
|
||||
help.c_str(), cmStateEnums::PATH, true);
|
||||
return found;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,8 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn,
|
||||
if (this->AlreadyInCacheWithoutMetaInfo) {
|
||||
this->Makefile->AddCacheDefinition(
|
||||
this->VariableName, "", this->VariableDocumentation.c_str(),
|
||||
(this->IncludeFileInPath ? cmState::FILEPATH : cmState::PATH));
|
||||
(this->IncludeFileInPath ? cmStateEnums::FILEPATH
|
||||
: cmStateEnums::PATH));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -35,13 +36,13 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn,
|
||||
if (!result.empty()) {
|
||||
this->Makefile->AddCacheDefinition(
|
||||
this->VariableName, result.c_str(), this->VariableDocumentation.c_str(),
|
||||
(this->IncludeFileInPath) ? cmState::FILEPATH : cmState::PATH);
|
||||
(this->IncludeFileInPath) ? cmStateEnums::FILEPATH : cmStateEnums::PATH);
|
||||
return true;
|
||||
}
|
||||
this->Makefile->AddCacheDefinition(
|
||||
this->VariableName, (this->VariableName + "-NOTFOUND").c_str(),
|
||||
this->VariableDocumentation.c_str(),
|
||||
(this->IncludeFileInPath) ? cmState::FILEPATH : cmState::PATH);
|
||||
(this->IncludeFileInPath) ? cmStateEnums::FILEPATH : cmStateEnums::PATH);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn,
|
||||
if (this->AlreadyInCacheWithoutMetaInfo) {
|
||||
this->Makefile->AddCacheDefinition(this->VariableName, "",
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmState::FILEPATH);
|
||||
cmStateEnums::FILEPATH);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -100,13 +100,13 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn,
|
||||
// Save the value in the cache
|
||||
this->Makefile->AddCacheDefinition(this->VariableName, result.c_str(),
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmState::FILEPATH);
|
||||
cmStateEnums::FILEPATH);
|
||||
|
||||
return true;
|
||||
}
|
||||
this->Makefile->AddCacheDefinition(
|
||||
this->VariableName, (this->VariableName + "-NOTFOUND").c_str(),
|
||||
this->VariableDocumentation.c_str(), cmState::FILEPATH);
|
||||
this->VariableDocumentation.c_str(), cmStateEnums::FILEPATH);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -88,13 +88,13 @@ bool cmGetFilenameComponentCommand::InitialPass(
|
||||
|
||||
if (args.size() >= 4 && args[args.size() - 1] == "CACHE") {
|
||||
if (!programArgs.empty() && !storeArgs.empty()) {
|
||||
this->Makefile->AddCacheDefinition(storeArgs, programArgs.c_str(), "",
|
||||
args[2] == "PATH" ? cmState::FILEPATH
|
||||
: cmState::STRING);
|
||||
this->Makefile->AddCacheDefinition(
|
||||
storeArgs, programArgs.c_str(), "",
|
||||
args[2] == "PATH" ? cmStateEnums::FILEPATH : cmStateEnums::STRING);
|
||||
}
|
||||
this->Makefile->AddCacheDefinition(args[0], result.c_str(), "",
|
||||
args[2] == "PATH" ? cmState::FILEPATH
|
||||
: cmState::STRING);
|
||||
this->Makefile->AddCacheDefinition(
|
||||
args[0], result.c_str(), "",
|
||||
args[2] == "PATH" ? cmStateEnums::FILEPATH : cmStateEnums::STRING);
|
||||
} else {
|
||||
if (!programArgs.empty() && !storeArgs.empty()) {
|
||||
this->Makefile->AddDefinition(storeArgs, programArgs.c_str());
|
||||
|
@ -308,7 +308,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
|
||||
makeProgram += "/";
|
||||
makeProgram += saveFile;
|
||||
mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", makeProgram.c_str(),
|
||||
"make program", cmState::FILEPATH);
|
||||
"make program", cmStateEnums::FILEPATH);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1103,7 +1103,7 @@ void cmGlobalGenerator::Configure()
|
||||
sprintf(num, "%d", static_cast<int>(this->Makefiles.size()));
|
||||
this->GetCMakeInstance()->AddCacheEntry("CMAKE_NUMBER_OF_MAKEFILES", num,
|
||||
"number of local generators",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
|
||||
// check for link libraries and include directories containing "NOTFOUND"
|
||||
// and for infinite loops
|
||||
@ -1886,8 +1886,8 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator* gen,
|
||||
this->TryCompileOuterMakefile = mf;
|
||||
const char* make =
|
||||
gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM");
|
||||
this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", make,
|
||||
"make program", cmState::FILEPATH);
|
||||
this->GetCMakeInstance()->AddCacheEntry(
|
||||
"CMAKE_MAKE_PROGRAM", make, "make program", cmStateEnums::FILEPATH);
|
||||
// copy the enabled languages
|
||||
this->GetCMakeInstance()->GetState()->SetEnabledLanguages(
|
||||
gen->GetCMakeInstance()->GetState()->GetEnabledLanguages());
|
||||
|
@ -93,7 +93,7 @@ std::string cmGlobalUnixMakefileGenerator3::GetEditCacheCommand() const
|
||||
if (!editCacheCommand.empty()) {
|
||||
cm->AddCacheEntry("CMAKE_EDIT_COMMAND", editCacheCommand.c_str(),
|
||||
"Path to cache edit program executable.",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
}
|
||||
const char* edit_cmd = cm->GetCacheDefinition("CMAKE_EDIT_COMMAND");
|
||||
|
@ -101,7 +101,7 @@ void cmGlobalVisualStudio7Generator::EnableLanguage(
|
||||
"Semicolon separated list of supported configuration types, "
|
||||
"only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
|
||||
"anything else will be ignored.",
|
||||
cmState::STRING);
|
||||
cmStateEnums::STRING);
|
||||
}
|
||||
|
||||
// Create list of configurations requested by user's cache, if any.
|
||||
@ -118,7 +118,7 @@ void cmGlobalVisualStudio7Generator::EnableLanguage(
|
||||
if (cmSystemTools::GetEnv("CMAKE_MSVCIDE_RUN_PATH", extraPath)) {
|
||||
mf->AddCacheDefinition("CMAKE_MSVCIDE_RUN_PATH", extraPath.c_str(),
|
||||
"Saved environment variable CMAKE_MSVCIDE_RUN_PATH",
|
||||
cmState::STATIC);
|
||||
cmStateEnums::STATIC);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,7 +257,7 @@ void cmGlobalXCodeGenerator::EnableLanguage(
|
||||
"Semicolon separated list of supported configuration types, "
|
||||
"only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
|
||||
"anything else will be ignored.",
|
||||
cmState::STRING);
|
||||
cmStateEnums::STRING);
|
||||
}
|
||||
}
|
||||
mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
|
||||
@ -2432,8 +2432,9 @@ std::string cmGlobalXCodeGenerator::GetOrCreateId(const std::string& name,
|
||||
return storedGUID;
|
||||
}
|
||||
|
||||
this->CMakeInstance->AddCacheEntry(
|
||||
guidStoreName, id.c_str(), "Stored Xcode object GUID", cmState::INTERNAL);
|
||||
this->CMakeInstance->AddCacheEntry(guidStoreName, id.c_str(),
|
||||
"Stored Xcode object GUID",
|
||||
cmStateEnums::INTERNAL);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ bool cmIncludeExternalMSProjectCommand::InitialPass(
|
||||
std::string guidVariable = utility_name + "_GUID_CMAKE";
|
||||
this->Makefile->GetCMakeInstance()->AddCacheEntry(
|
||||
guidVariable.c_str(), customGuid.c_str(), "Stored GUID",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
// Create a target instance for this utility.
|
||||
|
@ -140,7 +140,7 @@ void cmLoadCacheCommand::CheckLine(const char* line)
|
||||
// Check one line of the cache file.
|
||||
std::string var;
|
||||
std::string value;
|
||||
cmState::CacheEntryType type = cmState::UNINITIALIZED;
|
||||
cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED;
|
||||
if (cmake::ParseCacheEntry(line, var, value, type)) {
|
||||
// Found a real entry. See if this one was requested.
|
||||
if (this->VariablesToRead.find(var) != this->VariablesToRead.end()) {
|
||||
|
@ -95,7 +95,7 @@ void cmLocalVisualStudio10Generator::ReadAndStoreExternalGUID(
|
||||
// save the GUID in the cache
|
||||
this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry(
|
||||
guidStoreName.c_str(), parser.GUID.c_str(), "Stored GUID",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
const char* cmLocalVisualStudio10Generator::ReportErrorLabel() const
|
||||
|
@ -2118,7 +2118,7 @@ void cmLocalVisualStudio7Generator::ReadAndStoreExternalGUID(
|
||||
// save the GUID in the cache
|
||||
this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry(
|
||||
guidStoreName.c_str(), parser.GUID.c_str(), "Stored GUID",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
std::string cmLocalVisualStudio7Generator::GetTargetDirectory(
|
||||
|
@ -1643,20 +1643,21 @@ void cmMakefile::AddDefinition(const std::string& name, const char* value)
|
||||
|
||||
void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
|
||||
const char* doc,
|
||||
cmState::CacheEntryType type, bool force)
|
||||
cmStateEnums::CacheEntryType type,
|
||||
bool force)
|
||||
{
|
||||
const char* existingValue = this->GetState()->GetInitializedCacheValue(name);
|
||||
// must be outside the following if() to keep it alive long enough
|
||||
std::string nvalue;
|
||||
|
||||
if (existingValue &&
|
||||
(this->GetState()->GetCacheEntryType(name) == cmState::UNINITIALIZED)) {
|
||||
if (existingValue && (this->GetState()->GetCacheEntryType(name) ==
|
||||
cmStateEnums::UNINITIALIZED)) {
|
||||
// if this is not a force, then use the value from the cache
|
||||
// if it is a force, then use the value being passed in
|
||||
if (!force) {
|
||||
value = existingValue;
|
||||
}
|
||||
if (type == cmState::PATH || type == cmState::FILEPATH) {
|
||||
if (type == cmStateEnums::PATH || type == cmStateEnums::FILEPATH) {
|
||||
std::vector<std::string>::size_type cc;
|
||||
std::vector<std::string> files;
|
||||
nvalue = value ? value : "";
|
||||
@ -3177,7 +3178,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
||||
// Add this before the user-provided CMake arguments in case
|
||||
// one of the arguments is -DCMAKE_BUILD_TYPE=...
|
||||
cm.AddCacheEntry("CMAKE_BUILD_TYPE", config, "Build configuration",
|
||||
cmState::STRING);
|
||||
cmStateEnums::STRING);
|
||||
}
|
||||
}
|
||||
// if cmake args were provided then pass them in
|
||||
@ -3213,10 +3214,10 @@ int cmMakefile::TryCompile(const std::string& srcdir,
|
||||
gg->EnableLanguagesFromGenerator(this->GetGlobalGenerator(), this);
|
||||
if (this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS")) {
|
||||
cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", "",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
} else {
|
||||
cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", "",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
if (cm.Configure() != 0) {
|
||||
cmSystemTools::Error(
|
||||
|
@ -224,7 +224,7 @@ public:
|
||||
void AddDefinition(const std::string& name, const char* value);
|
||||
///! Add a definition to this makefile and the global cmake cache.
|
||||
void AddCacheDefinition(const std::string& name, const char* value,
|
||||
const char* doc, cmState::CacheEntryType type,
|
||||
const char* doc, cmStateEnums::CacheEntryType type,
|
||||
bool force = false);
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ bool cmMarkAsAdvancedCommand::InitialPass(std::vector<std::string> const& args,
|
||||
cmState* state = this->Makefile->GetState();
|
||||
if (!state->GetCacheEntryValue(variable)) {
|
||||
this->Makefile->GetCMakeInstance()->AddCacheEntry(
|
||||
variable, CM_NULLPTR, CM_NULLPTR, cmState::UNINITIALIZED);
|
||||
variable, CM_NULLPTR, CM_NULLPTR, cmStateEnums::UNINITIALIZED);
|
||||
overwrite = true;
|
||||
}
|
||||
if (!state->GetCacheEntryValue(variable)) {
|
||||
|
@ -32,7 +32,7 @@ bool cmOptionCommand::InitialPass(std::vector<std::string> const& args,
|
||||
cmState* state = this->Makefile->GetState();
|
||||
const char* existingValue = state->GetCacheEntryValue(args[0]);
|
||||
if (existingValue) {
|
||||
if (state->GetCacheEntryType(args[0]) != cmState::UNINITIALIZED) {
|
||||
if (state->GetCacheEntryType(args[0]) != cmStateEnums::UNINITIALIZED) {
|
||||
state->SetCacheEntryProperty(args[0], "HELPSTRING", args[1]);
|
||||
return true;
|
||||
}
|
||||
@ -43,6 +43,6 @@ bool cmOptionCommand::InitialPass(std::vector<std::string> const& args,
|
||||
}
|
||||
bool init = cmSystemTools::IsOn(initialValue.c_str());
|
||||
this->Makefile->AddCacheDefinition(args[0], init ? "ON" : "OFF",
|
||||
args[1].c_str(), cmState::BOOL);
|
||||
args[1].c_str(), cmStateEnums::BOOL);
|
||||
return true;
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, const char* version)
|
||||
"For backwards compatibility, what version of CMake "
|
||||
"commands and "
|
||||
"syntax should this version of CMake try to support.",
|
||||
cmState::STRING);
|
||||
cmStateEnums::STRING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,10 +19,10 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
|
||||
|
||||
this->Makefile->AddCacheDefinition(
|
||||
bindir, this->Makefile->GetCurrentBinaryDirectory(),
|
||||
"Value Computed by CMake", cmState::STATIC);
|
||||
"Value Computed by CMake", cmStateEnums::STATIC);
|
||||
this->Makefile->AddCacheDefinition(
|
||||
srcdir, this->Makefile->GetCurrentSourceDirectory(),
|
||||
"Value Computed by CMake", cmState::STATIC);
|
||||
"Value Computed by CMake", cmStateEnums::STATIC);
|
||||
|
||||
bindir = "PROJECT_BINARY_DIR";
|
||||
srcdir = "PROJECT_SOURCE_DIR";
|
||||
@ -45,7 +45,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
|
||||
this->Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str());
|
||||
this->Makefile->AddCacheDefinition("CMAKE_PROJECT_NAME", args[0].c_str(),
|
||||
"Value Computed by CMake",
|
||||
cmState::STATIC);
|
||||
cmStateEnums::STATIC);
|
||||
}
|
||||
|
||||
bool haveVersion = false;
|
||||
|
@ -64,8 +64,9 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args,
|
||||
bool cache = false; // optional
|
||||
bool force = false; // optional
|
||||
bool parentScope = false;
|
||||
cmState::CacheEntryType type = cmState::STRING; // required if cache
|
||||
const char* docstring = CM_NULLPTR; // required if cache
|
||||
cmStateEnums::CacheEntryType type =
|
||||
cmStateEnums::STRING; // required if cache
|
||||
const char* docstring = CM_NULLPTR; // required if cache
|
||||
|
||||
unsigned int ignoreLastArgs = 0;
|
||||
// look for PARENT_SCOPE argument
|
||||
@ -115,12 +116,12 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args,
|
||||
cmState* state = this->Makefile->GetState();
|
||||
const char* existingValue = state->GetCacheEntryValue(variable);
|
||||
if (existingValue &&
|
||||
(state->GetCacheEntryType(variable) != cmState::UNINITIALIZED)) {
|
||||
(state->GetCacheEntryType(variable) != cmStateEnums::UNINITIALIZED)) {
|
||||
// if the set is trying to CACHE the value but the value
|
||||
// is already in the cache and the type is not internal
|
||||
// then leave now without setting any definitions in the cache
|
||||
// or the makefile
|
||||
if (cache && type != cmState::INTERNAL && !force) {
|
||||
if (cache && type != cmStateEnums::INTERNAL && !force) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,8 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args,
|
||||
#endif
|
||||
this->Makefile->AddCacheDefinition(
|
||||
args[0], siteName.c_str(),
|
||||
"Name of the computer/site where compile is being run", cmState::STRING);
|
||||
"Name of the computer/site where compile is being run",
|
||||
cmStateEnums::STRING);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ const char* cmCacheEntryTypes[] = { "BOOL", "PATH", "FILEPATH",
|
||||
"STRING", "INTERNAL", "STATIC",
|
||||
"UNINITIALIZED", CM_NULLPTR };
|
||||
|
||||
const char* cmState::CacheEntryTypeToString(cmState::CacheEntryType type)
|
||||
const char* cmState::CacheEntryTypeToString(cmStateEnums::CacheEntryType type)
|
||||
{
|
||||
if (type > 6) {
|
||||
return cmCacheEntryTypes[6];
|
||||
@ -155,16 +155,16 @@ const char* cmState::CacheEntryTypeToString(cmState::CacheEntryType type)
|
||||
return cmCacheEntryTypes[type];
|
||||
}
|
||||
|
||||
cmState::CacheEntryType cmState::StringToCacheEntryType(const char* s)
|
||||
cmStateEnums::CacheEntryType cmState::StringToCacheEntryType(const char* s)
|
||||
{
|
||||
int i = 0;
|
||||
while (cmCacheEntryTypes[i]) {
|
||||
if (strcmp(s, cmCacheEntryTypes[i]) == 0) {
|
||||
return static_cast<cmState::CacheEntryType>(i);
|
||||
return static_cast<cmStateEnums::CacheEntryType>(i);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
return STRING;
|
||||
return cmStateEnums::STRING;
|
||||
}
|
||||
|
||||
bool cmState::IsCacheEntryType(std::string const& key)
|
||||
@ -219,7 +219,7 @@ const char* cmState::GetInitializedCacheValue(std::string const& key) const
|
||||
return this->CacheManager->GetInitializedCacheValue(key);
|
||||
}
|
||||
|
||||
cmState::CacheEntryType cmState::GetCacheEntryType(
|
||||
cmStateEnums::CacheEntryType cmState::GetCacheEntryType(
|
||||
std::string const& key) const
|
||||
{
|
||||
cmCacheManager::CacheIterator it =
|
||||
@ -279,7 +279,7 @@ bool cmState::GetCacheEntryPropertyAsBool(std::string const& key,
|
||||
|
||||
void cmState::AddCacheEntry(const std::string& key, const char* value,
|
||||
const char* helpString,
|
||||
cmState::CacheEntryType type)
|
||||
cmStateEnums::CacheEntryType type)
|
||||
{
|
||||
this->CacheManager->AddCacheEntry(key, value, helpString, type);
|
||||
}
|
||||
@ -1806,7 +1806,8 @@ static bool ParseEntryWithoutType(const std::string& entry, std::string& var,
|
||||
}
|
||||
|
||||
bool cmState::ParseCacheEntry(const std::string& entry, std::string& var,
|
||||
std::string& value, CacheEntryType& type)
|
||||
std::string& value,
|
||||
cmStateEnums::CacheEntryType& type)
|
||||
{
|
||||
// input line is: key:type=value
|
||||
static cmsys::RegularExpression reg(
|
||||
|
@ -56,6 +56,16 @@ enum TargetType
|
||||
INTERFACE_LIBRARY,
|
||||
UNKNOWN_LIBRARY
|
||||
};
|
||||
enum CacheEntryType
|
||||
{
|
||||
BOOL = 0,
|
||||
PATH,
|
||||
FILEPATH,
|
||||
STRING,
|
||||
INTERNAL,
|
||||
STATIC,
|
||||
UNINITIALIZED
|
||||
};
|
||||
}
|
||||
|
||||
class cmState
|
||||
@ -214,18 +224,8 @@ public:
|
||||
Snapshot CreatePolicyScopeSnapshot(Snapshot originSnapshot);
|
||||
Snapshot Pop(Snapshot originSnapshot);
|
||||
|
||||
enum CacheEntryType
|
||||
{
|
||||
BOOL = 0,
|
||||
PATH,
|
||||
FILEPATH,
|
||||
STRING,
|
||||
INTERNAL,
|
||||
STATIC,
|
||||
UNINITIALIZED
|
||||
};
|
||||
static CacheEntryType StringToCacheEntryType(const char*);
|
||||
static const char* CacheEntryTypeToString(CacheEntryType);
|
||||
static cmStateEnums::CacheEntryType StringToCacheEntryType(const char*);
|
||||
static const char* CacheEntryTypeToString(cmStateEnums::CacheEntryType);
|
||||
static bool IsCacheEntryType(std::string const& key);
|
||||
|
||||
bool LoadCache(const std::string& path, bool internal,
|
||||
@ -239,7 +239,7 @@ public:
|
||||
std::vector<std::string> GetCacheEntryKeys() const;
|
||||
const char* GetCacheEntryValue(std::string const& key) const;
|
||||
const char* GetInitializedCacheValue(std::string const& key) const;
|
||||
CacheEntryType GetCacheEntryType(std::string const& key) const;
|
||||
cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key) const;
|
||||
void SetCacheEntryValue(std::string const& key, std::string const& value);
|
||||
void SetCacheValue(std::string const& key, std::string const& value);
|
||||
|
||||
@ -264,7 +264,8 @@ public:
|
||||
|
||||
///! Break up a line like VAR:type="value" into var, type and value
|
||||
static bool ParseCacheEntry(const std::string& entry, std::string& var,
|
||||
std::string& value, CacheEntryType& type);
|
||||
std::string& value,
|
||||
cmStateEnums::CacheEntryType& type);
|
||||
|
||||
Snapshot Reset();
|
||||
// Define a property
|
||||
@ -328,7 +329,8 @@ public:
|
||||
private:
|
||||
friend class cmake;
|
||||
void AddCacheEntry(const std::string& key, const char* value,
|
||||
const char* helpString, CacheEntryType type);
|
||||
const char* helpString,
|
||||
cmStateEnums::CacheEntryType type);
|
||||
|
||||
std::map<cmProperty::ScopeType, cmPropertyDefinitionMap> PropertyDefinitions;
|
||||
std::vector<std::string> EnabledLanguages;
|
||||
|
@ -635,7 +635,7 @@ void cmTarget::ClearDependencyInformation(cmMakefile& mf,
|
||||
depname += "_LIB_DEPENDS";
|
||||
if (this->RecordDependencies) {
|
||||
mf.AddCacheDefinition(depname, "", "Dependencies for target",
|
||||
cmState::STATIC);
|
||||
cmStateEnums::STATIC);
|
||||
} else {
|
||||
if (mf.GetDefinition(depname)) {
|
||||
std::string message = "Target ";
|
||||
@ -773,7 +773,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib,
|
||||
dependencies += lib;
|
||||
dependencies += ";";
|
||||
mf.AddCacheDefinition(targetEntry, dependencies.c_str(),
|
||||
"Dependencies for the target", cmState::STATIC);
|
||||
"Dependencies for the target", cmStateEnums::STATIC);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,8 @@ void cmTryRunCommand::RunExecutable(const std::string& runArgs,
|
||||
strcpy(retChar, "FAILED_TO_RUN");
|
||||
}
|
||||
this->Makefile->AddCacheDefinition(this->RunResultVariable, retChar,
|
||||
"Result of TRY_RUN", cmState::INTERNAL);
|
||||
"Result of TRY_RUN",
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
/* This is only used when cross compiling. Instead of running the
|
||||
@ -231,7 +232,7 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs,
|
||||
comment += detailsString;
|
||||
this->Makefile->AddCacheDefinition(this->RunResultVariable,
|
||||
"PLEASE_FILL_OUT-FAILED_TO_RUN",
|
||||
comment.c_str(), cmState::STRING);
|
||||
comment.c_str(), cmStateEnums::STRING);
|
||||
|
||||
cmState* state = this->Makefile->GetState();
|
||||
const char* existingValue =
|
||||
@ -254,9 +255,9 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs,
|
||||
"would have printed on stdout and stderr on its target platform.\n";
|
||||
comment += detailsString;
|
||||
|
||||
this->Makefile->AddCacheDefinition(internalRunOutputName,
|
||||
"PLEASE_FILL_OUT-NOTFOUND",
|
||||
comment.c_str(), cmState::STRING);
|
||||
this->Makefile->AddCacheDefinition(
|
||||
internalRunOutputName, "PLEASE_FILL_OUT-NOTFOUND", comment.c_str(),
|
||||
cmStateEnums::STRING);
|
||||
cmState* state = this->Makefile->GetState();
|
||||
const char* existing = state->GetCacheEntryValue(internalRunOutputName);
|
||||
if (existing) {
|
||||
|
@ -98,13 +98,13 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args,
|
||||
// Enter the value into the cache.
|
||||
this->Makefile->AddCacheDefinition(cacheEntry, utilityExecutable.c_str(),
|
||||
"Path to an internal program.",
|
||||
cmState::FILEPATH);
|
||||
cmStateEnums::FILEPATH);
|
||||
// add a value into the cache that maps from the
|
||||
// full path to the name of the project
|
||||
cmSystemTools::ConvertToUnixSlashes(utilityExecutable);
|
||||
this->Makefile->AddCacheDefinition(utilityExecutable, utilityName.c_str(),
|
||||
"Executable to project name.",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
|
||||
}
|
||||
}
|
||||
std::string var, value;
|
||||
cmState::CacheEntryType type = cmState::UNINITIALIZED;
|
||||
cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED;
|
||||
if (cmState::ParseCacheEntry(entry, var, value, type)) {
|
||||
// The value is transformed if it is a filepath for example, so
|
||||
// we can't compare whether the value is already in the cache until
|
||||
@ -410,8 +410,8 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
|
||||
std::vector<std::string> cacheKeys = this->State->GetCacheEntryKeys();
|
||||
for (std::vector<std::string>::const_iterator it = cacheKeys.begin();
|
||||
it != cacheKeys.end(); ++it) {
|
||||
cmState::CacheEntryType t = this->State->GetCacheEntryType(*it);
|
||||
if (t != cmState::STATIC) {
|
||||
cmStateEnums::CacheEntryType t = this->State->GetCacheEntryType(*it);
|
||||
if (t != cmStateEnums::STATIC) {
|
||||
if (regex.find(it->c_str())) {
|
||||
entriesToDelete.push_back(*it);
|
||||
}
|
||||
@ -859,14 +859,14 @@ int cmake::AddCMakePaths()
|
||||
// Save the value in the cache
|
||||
this->AddCacheEntry("CMAKE_COMMAND",
|
||||
cmSystemTools::GetCMakeCommand().c_str(),
|
||||
"Path to CMake executable.", cmState::INTERNAL);
|
||||
"Path to CMake executable.", cmStateEnums::INTERNAL);
|
||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||
this->AddCacheEntry("CMAKE_CTEST_COMMAND",
|
||||
cmSystemTools::GetCTestCommand().c_str(),
|
||||
"Path to ctest program executable.", cmState::INTERNAL);
|
||||
this->AddCacheEntry("CMAKE_CPACK_COMMAND",
|
||||
cmSystemTools::GetCPackCommand().c_str(),
|
||||
"Path to cpack program executable.", cmState::INTERNAL);
|
||||
this->AddCacheEntry(
|
||||
"CMAKE_CTEST_COMMAND", cmSystemTools::GetCTestCommand().c_str(),
|
||||
"Path to ctest program executable.", cmStateEnums::INTERNAL);
|
||||
this->AddCacheEntry(
|
||||
"CMAKE_CPACK_COMMAND", cmSystemTools::GetCPackCommand().c_str(),
|
||||
"Path to cpack program executable.", cmStateEnums::INTERNAL);
|
||||
#endif
|
||||
if (!cmSystemTools::FileExists(
|
||||
(cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake").c_str())) {
|
||||
@ -879,7 +879,7 @@ int cmake::AddCMakePaths()
|
||||
return 0;
|
||||
}
|
||||
this->AddCacheEntry("CMAKE_ROOT", cmSystemTools::GetCMakeRoot().c_str(),
|
||||
"Path to CMake installation.", cmState::INTERNAL);
|
||||
"Path to CMake installation.", cmStateEnums::INTERNAL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -1147,7 +1147,7 @@ struct SaveCacheEntry
|
||||
std::string key;
|
||||
std::string value;
|
||||
std::string help;
|
||||
cmState::CacheEntryType type;
|
||||
cmStateEnums::CacheEntryType type;
|
||||
};
|
||||
|
||||
int cmake::HandleDeleteCacheVariables(const std::string& var)
|
||||
@ -1291,7 +1291,7 @@ int cmake::ActualConfigure()
|
||||
"CMAKE_HOME_DIRECTORY", this->GetHomeDirectory(),
|
||||
"Source directory with the top level CMakeLists.txt file for this "
|
||||
"project",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
// no generator specified on the command line
|
||||
@ -1338,11 +1338,11 @@ int cmake::ActualConfigure()
|
||||
if (!this->State->GetInitializedCacheValue("CMAKE_GENERATOR")) {
|
||||
this->AddCacheEntry("CMAKE_GENERATOR",
|
||||
this->GlobalGenerator->GetName().c_str(),
|
||||
"Name of generator.", cmState::INTERNAL);
|
||||
"Name of generator.", cmStateEnums::INTERNAL);
|
||||
this->AddCacheEntry("CMAKE_EXTRA_GENERATOR",
|
||||
this->GlobalGenerator->GetExtraGeneratorName().c_str(),
|
||||
"Name of external makefile project generator.",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
if (const char* platformName =
|
||||
@ -1362,7 +1362,7 @@ int cmake::ActualConfigure()
|
||||
} else {
|
||||
this->AddCacheEntry("CMAKE_GENERATOR_PLATFORM",
|
||||
this->GeneratorPlatform.c_str(),
|
||||
"Name of generator platform.", cmState::INTERNAL);
|
||||
"Name of generator platform.", cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
if (const char* tsName =
|
||||
@ -1382,7 +1382,7 @@ int cmake::ActualConfigure()
|
||||
} else {
|
||||
this->AddCacheEntry("CMAKE_GENERATOR_TOOLSET",
|
||||
this->GeneratorToolset.c_str(),
|
||||
"Name of generator toolset.", cmState::INTERNAL);
|
||||
"Name of generator toolset.", cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
// reset any system configuration information, except for when we are
|
||||
@ -1411,13 +1411,14 @@ int cmake::ActualConfigure()
|
||||
if (!this->State->GetInitializedCacheValue("LIBRARY_OUTPUT_PATH")) {
|
||||
this->AddCacheEntry(
|
||||
"LIBRARY_OUTPUT_PATH", "",
|
||||
"Single output directory for building all libraries.", cmState::PATH);
|
||||
"Single output directory for building all libraries.",
|
||||
cmStateEnums::PATH);
|
||||
}
|
||||
if (!this->State->GetInitializedCacheValue("EXECUTABLE_OUTPUT_PATH")) {
|
||||
this->AddCacheEntry(
|
||||
"EXECUTABLE_OUTPUT_PATH", "",
|
||||
"Single output directory for building all executables.",
|
||||
cmState::PATH);
|
||||
cmStateEnums::PATH);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1640,7 +1641,7 @@ void cmake::AddCacheEntry(const std::string& key, const char* value,
|
||||
const char* helpString, int type)
|
||||
{
|
||||
this->State->AddCacheEntry(key, value, helpString,
|
||||
cmState::CacheEntryType(type));
|
||||
cmStateEnums::CacheEntryType(type));
|
||||
this->UnwatchUnusedCli(key);
|
||||
}
|
||||
|
||||
@ -1694,7 +1695,8 @@ void cmake::AddDefaultGenerators()
|
||||
}
|
||||
|
||||
bool cmake::ParseCacheEntry(const std::string& entry, std::string& var,
|
||||
std::string& value, cmState::CacheEntryType& type)
|
||||
std::string& value,
|
||||
cmStateEnums::CacheEntryType& type)
|
||||
{
|
||||
return cmState::ParseCacheEntry(entry, var, value, type);
|
||||
}
|
||||
@ -2464,7 +2466,7 @@ void cmake::SetSuppressDevWarnings(bool b)
|
||||
this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", value.c_str(),
|
||||
"Suppress Warnings that are meant for"
|
||||
" the author of the CMakeLists.txt files.",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
bool cmake::GetSuppressDeprecatedWarnings() const
|
||||
@ -2488,7 +2490,7 @@ void cmake::SetSuppressDeprecatedWarnings(bool b)
|
||||
this->AddCacheEntry("CMAKE_WARN_DEPRECATED", value.c_str(),
|
||||
"Whether to issue warnings for deprecated "
|
||||
"functionality.",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
bool cmake::GetDevWarningsAsErrors() const
|
||||
@ -2512,7 +2514,7 @@ void cmake::SetDevWarningsAsErrors(bool b)
|
||||
this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_ERRORS", value.c_str(),
|
||||
"Suppress errors that are meant for"
|
||||
" the author of the CMakeLists.txt files.",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
||||
bool cmake::GetDeprecatedWarningsAsErrors() const
|
||||
@ -2536,5 +2538,5 @@ void cmake::SetDeprecatedWarningsAsErrors(bool b)
|
||||
this->AddCacheEntry("CMAKE_ERROR_DEPRECATED", value.c_str(),
|
||||
"Whether to issue deprecation errors for macros"
|
||||
" and functions.",
|
||||
cmState::INTERNAL);
|
||||
cmStateEnums::INTERNAL);
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ public:
|
||||
///! Break up a line like VAR:type="value" into var, type and value
|
||||
static bool ParseCacheEntry(const std::string& entry, std::string& var,
|
||||
std::string& value,
|
||||
cmState::CacheEntryType& type);
|
||||
cmStateEnums::CacheEntryType& type);
|
||||
|
||||
int LoadCache();
|
||||
bool LoadCache(const std::string& path);
|
||||
|
@ -292,9 +292,9 @@ int do_cmake(int ac, char const* const* av)
|
||||
std::vector<std::string> keys = cm.GetState()->GetCacheEntryKeys();
|
||||
for (std::vector<std::string>::const_iterator it = keys.begin();
|
||||
it != keys.end(); ++it) {
|
||||
cmState::CacheEntryType t = cm.GetState()->GetCacheEntryType(*it);
|
||||
if (t != cmState::INTERNAL && t != cmState::STATIC &&
|
||||
t != cmState::UNINITIALIZED) {
|
||||
cmStateEnums::CacheEntryType t = cm.GetState()->GetCacheEntryType(*it);
|
||||
if (t != cmStateEnums::INTERNAL && t != cmStateEnums::STATIC &&
|
||||
t != cmStateEnums::UNINITIALIZED) {
|
||||
const char* advancedProp =
|
||||
cm.GetState()->GetCacheEntryProperty(*it, "ADVANCED");
|
||||
if (list_all_cached || !advancedProp) {
|
||||
|
Loading…
Reference in New Issue
Block a user