diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2017-07-18 15:08:10 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2017-07-21 13:09:56 (GMT) |
commit | b7941641430feeefadc6f16e2cecf6b50bd9fbe3 (patch) | |
tree | 0cd3337f4b799631752d94f3110c6943cd792ecd /Tests/RunCMake/string/RunCMakeTest.cmake | |
parent | ec049641c46eb788b25713e5d96ff32c89f0e819 (diff) | |
download | CMake-b7941641430feeefadc6f16e2cecf6b50bd9fbe3.zip CMake-b7941641430feeefadc6f16e2cecf6b50bd9fbe3.tar.gz CMake-b7941641430feeefadc6f16e2cecf6b50bd9fbe3.tar.bz2 |
cmStringCommand: clear intermediate matches
When `string(REGEX REPLACE)` or `string(REGEX MATCHALL)` loop
internally, they store their matches, but they do not clear the previous
match from an earlier iteration. This can leave the contents of
`CMAKE_MATCH_<N>` with bogus values for later matches in the string if
they have groups which earlier matched a non-empty string, but now match
an empty string.
Fixes #17079.
Diffstat (limited to 'Tests/RunCMake/string/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/string/RunCMakeTest.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/RunCMake/string/RunCMakeTest.cmake b/Tests/RunCMake/string/RunCMakeTest.cmake index 38a77b0..32b61b5 100644 --- a/Tests/RunCMake/string/RunCMakeTest.cmake +++ b/Tests/RunCMake/string/RunCMakeTest.cmake @@ -20,6 +20,7 @@ run_cmake(UuidMissingTypeValue) run_cmake(UuidBadType) run_cmake(RegexClear) +run_cmake(RegexMultiMatchClear) run_cmake(UTF-16BE) run_cmake(UTF-16LE) |