diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-10-20 12:17:19 -0400 |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2014-10-20 12:17:19 -0400 |
commit | aee7e4a03b8b410212e2eae23d1ecc182c8da817 (patch) | |
tree | f578048b76fed26906e2eb0b776197b72f9f9834 /Source/cmCacheManager.cxx | |
parent | 368e8de4cd5a5d97c9b5e81489bf014579211bda (diff) | |
download | cmake-aee7e4a03b8b410212e2eae23d1ecc182c8da817.tar.gz |
cmCacheManager: parse -D flags more strictly
In the case of:
-DCACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG:BOOL=TRUE
the variable is parsed out as:
CACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG
because the parser allows '=' in the variable name. Disallow such a name
on the command line.
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r-- | Source/cmCacheManager.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index d6b84a0002..17bfe4b002 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -139,7 +139,7 @@ bool cmCacheManager::ParseEntry(const std::string& entry, { // input line is: key:type=value static cmsys::RegularExpression reg( - "^([^:]*):([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); + "^([^=:]*):([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); // input line is: "key":type=value static cmsys::RegularExpression regQuoted( "^\"([^\"]*)\":([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); |