summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2010-11-22 20:45:30 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-11-22 20:45:30 (GMT)
commit8b143fab66a2d1e93bf01eb7837a33e52644c396 (patch)
treeb51ea8952d7e381dadaa849ef3669b1185dc9c14 /Source/cmCacheManager.cxx
parent122ebf12976ce370d78aa14594baf39f30b5c9ee (diff)
downloadCMake-8b143fab66a2d1e93bf01eb7837a33e52644c396.zip
CMake-8b143fab66a2d1e93bf01eb7837a33e52644c396.tar.gz
CMake-8b143fab66a2d1e93bf01eb7837a33e52644c396.tar.bz2
Condense parsing of cache entries
If a cache line is being parsed, it shouldn't matter whether it has a type or not; just parse it however possible.
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index eabdf87..2baacbf 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -93,9 +93,9 @@ bool cmCacheManager::LoadCache(const char* path,
return this->LoadCache(path, internal, emptySet, emptySet);
}
-bool cmCacheManager::ParseEntry(const char* entry,
- std::string& var,
- std::string& value)
+static bool ParseEntryWithoutType(const char* entry,
+ std::string& var,
+ std::string& value)
{
// input line is: key=value
static cmsys::RegularExpression reg(
@@ -169,6 +169,11 @@ bool cmCacheManager::ParseEntry(const char* entry,
value.size() - 2);
}
+ if (!flag)
+ {
+ return ParseEntryWithoutType(entry, var, value);
+ }
+
return flag;
}
@@ -253,8 +258,7 @@ bool cmCacheManager::LoadCache(const char* path,
}
}
e.SetProperty("HELPSTRING", helpString.c_str());
- if(cmCacheManager::ParseEntry(realbuffer, entryKey, e.Value, e.Type) ||
- cmCacheManager::ParseEntry(realbuffer, entryKey, e.Value))
+ if(cmCacheManager::ParseEntry(realbuffer, entryKey, e.Value, e.Type))
{
if ( excludes.find(entryKey) == excludes.end() )
{