fixup! test: add a test for clearing regex results
fixup! cmMakefile: store the number of last matches in a CMake var
Merge topic 'cached-regex-clear-fixed' into next

a8a2fde1 fixup! cmMakefile: store the number of last matches in a CMake var
65b16412 fixup! test: add a test for clearing regex results
test: add a test for clearing regex results
cmMakefile: store the number of last matches in a CMake var

With PushScope and PopScope, keeping track of another bit of data for
each scope isn't easy. Instead, store it as another CMake variable so it
gets implicitly tracked along with everything else.

This works in a revert of commit
7d674b5f0b28a610333644d417c2e8cb796cc9e4.
Merge topic 'cached-regex-clear-fixed' into next

63e53d45 cmMakefile: store the number of last matches in a CMake var
f9dbfe26 test: add a test for clearing regex results