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

82d7acb3 fixup! cmMakefile: store the number of last matches in a CMake var
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

ceecd790 cmMakefile: store the number of last matches in a CMake var
7878d061 test: add a test for clearing regex results