diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-10-20 16:17:19 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2014-10-20 16:17:19 (GMT) |
commit | aee7e4a03b8b410212e2eae23d1ecc182c8da817 (patch) | |
tree | f578048b76fed26906e2eb0b776197b72f9f9834 /Source/cmCacheManager.cxx | |
parent | 368e8de4cd5a5d97c9b5e81489bf014579211bda (diff) | |
download | CMake-aee7e4a03b8b410212e2eae23d1ecc182c8da817.zip CMake-aee7e4a03b8b410212e2eae23d1ecc182c8da817.tar.gz CMake-aee7e4a03b8b410212e2eae23d1ecc182c8da817.tar.bz2 |
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 d6b84a0..17bfe4b 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 ]*$"); |