summaryrefslogtreecommitdiffstats
path: root/Source/cmMarkAsAdvancedCommand.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-11 18:05:45 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-11 18:05:45 (GMT)
commitbef93dc5c1cd7985013c9df096efbaa9b79dd7ac (patch)
tree4c028cecff3e8b237edf794b93852e42fefa2e1b /Source/cmMarkAsAdvancedCommand.cxx
parentbfdf8f7dcdbefe408adecd903fd669f62ad4815b (diff)
downloadCMake-bef93dc5c1cd7985013c9df096efbaa9b79dd7ac.zip
CMake-bef93dc5c1cd7985013c9df096efbaa9b79dd7ac.tar.gz
CMake-bef93dc5c1cd7985013c9df096efbaa9b79dd7ac.tar.bz2
Couple of changes: cache variables now have a map of properties. ADVANCED and HELPSTRING are now properties of cache variable, IsAdvanced is gone, so is GetCacheEntry, since cache entries are now all private. To access them, you use the iterator. -ADVANCED cache entries are gone and are replaced by the property of cache variables. The cache file still looks the same, but the -ADVANCED cache entries are created when writing file. MarkAsAdvanced and VariableRequires are fixed. So are curses gui and wizard
Diffstat (limited to 'Source/cmMarkAsAdvancedCommand.cxx')
-rw-r--r--Source/cmMarkAsAdvancedCommand.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx
index 30a401c..17f3002 100644
--- a/Source/cmMarkAsAdvancedCommand.cxx
+++ b/Source/cmMarkAsAdvancedCommand.cxx
@@ -42,17 +42,20 @@ bool cmMarkAsAdvancedCommand::InitialPass(std::vector<std::string> const& argsIn
for(; i < args.size(); ++i)
{
std::string variable = args[i];
- variable += "-ADVANCED";
- std::string doc = "Advanced flag for variable: ";
- doc += args[i];
- // if not CLEAR or FORCE or it is not yet defined,
- // then define variable-ADVANCED
- if(overwrite || !m_Makefile->GetDefinition(variable.c_str()))
+ cmCacheManager* manager = m_Makefile->GetCacheManager();
+ cmCacheManager::CacheIterator it = manager->GetCacheIterator(variable.c_str());
+ if ( it.IsAtEnd() )
{
- m_Makefile->AddCacheDefinition(variable.c_str(), value,
- doc.c_str(),
- cmCacheManager::INTERNAL);
+ m_Makefile->AddCacheDefinition(variable.c_str(), 0, 0,
+ cmCacheManager::UNINITIALIZED);
}
+ it.Find(variable.c_str());
+ if ( it.IsAtEnd() )
+ {
+ cmSystemTools::Error("This should never happen...");
+ return false;
+ }
+ it.SetProperty("ADVANCED", value);
}
return true;
}