mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-01 04:08:46 -06:00
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
7d674b5f0b.
This commit is contained in:
8
Help/variable/CMAKE_MATCH_COUNT.rst
Normal file
8
Help/variable/CMAKE_MATCH_COUNT.rst
Normal file
@@ -0,0 +1,8 @@
|
||||
CMAKE_MATCH_COUNT
|
||||
-----------------
|
||||
|
||||
The number of matches with the last regular expression.
|
||||
|
||||
When a regular expression match is used, CMake fills in ``CMAKE_MATCH_<n>``
|
||||
variables with the match contents. The ``CMAKE_MATCH_COUNT`` variable holds
|
||||
the number of match expressions when these are filled.
|
||||
Reference in New Issue
Block a user