summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmCacheManager.cxx14
-rw-r--r--Source/cmCacheManager.h4
-rw-r--r--Source/cmLoadCacheCommand.cxx3
-rw-r--r--Source/cmake.cxx3
4 files changed, 11 insertions, 13 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() )
{
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index da14966..314017b 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -139,10 +139,6 @@ public:
std::string& value,
CacheEntryType& type);
- static bool ParseEntry(const char* entry,
- std::string& var,
- std::string& value);
-
///! Get a value from the cache given a key
const char* GetCacheValue(const char* key) const;
diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx
index b06e2f9..a239e55 100644
--- a/Source/cmLoadCacheCommand.cxx
+++ b/Source/cmLoadCacheCommand.cxx
@@ -175,8 +175,7 @@ void cmLoadCacheCommand::CheckLine(const char* line)
std::string var;
std::string value;
cmCacheManager::CacheEntryType type = cmCacheManager::UNINITIALIZED;
- if(cmCacheManager::ParseEntry(line, var, value, type) ||
- cmCacheManager::ParseEntry(line, var, value))
+ if(cmCacheManager::ParseEntry(line, var, value, type))
{
// Found a real entry. See if this one was requested.
if(this->VariablesToRead.find(var) != this->VariablesToRead.end())
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 2ebd165..e332955 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -362,8 +362,7 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
}
std::string var, value;
cmCacheManager::CacheEntryType type = cmCacheManager::UNINITIALIZED;
- if(cmCacheManager::ParseEntry(entry.c_str(), var, value, type) ||
- cmCacheManager::ParseEntry(entry.c_str(), var, value))
+ if(cmCacheManager::ParseEntry(entry.c_str(), var, value, type))
{
this->CacheManager->AddCacheEntry(var.c_str(), value.c_str(),
"No help, variable specified on the command line.", type);