1 commit 6fe8624b7ff39f8511f4f4d7ebcbc5681932a6a5
2 Author: Ben Boeckel <ben.boeckel@kitware.com>
3 Date: Mon Nov 22 14:56:55 2010 -0500
5 Fix parsing of cache variables without a type
7 These mainly come from the command line or manual entries in the
8 CMakeCache.txt file. We want to stop at the first '=' because this is
9 what is most likely to have been meant. The variable can be quoted if
12 Caveat: What if one wants both '"' and '=' in a variable name?
14 diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
15 index 2aa6236..fe6467a 100644
16 --- a/Source/cmCacheManager.cxx
17 +++ b/Source/cmCacheManager.cxx
18 @@ -97,10 +97,10 @@ bool cmCacheManager::ParseEntry(const char* entry,
22 - // input line is: key:type=value
23 + // input line is: key=value
24 static cmsys::RegularExpression reg(
25 - "^([^:]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
26 - // input line is: "key":type=value
27 + "^([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
28 + // input line is: "key"=value
29 static cmsys::RegularExpression regQuoted(
30 "^\"([^\"]*)\"=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");