CMakePresets condition matches has no full regex support
The regex matching does not support \d
.
They probably have the same implementation and therefore limitations as in string(), so they should be mentioned and linked there (in documentation).
Example code:
"configurePresets": [
{
"name": "x86-windows-user-vs2019-Release",
...
"condition": {
"type": "matches",
"string": "$env{VSCMD_VER}",
"regex": "16\\.\\d+\\.\\d+"
}
},
...
This results in:
$ cmake --list-presets
(no further output)
Replacing \\d
with [0-9]
works and gives:
$ cmake --list-presets
Available configure presets:
"x86-windows-user-vs2019-Release"
btw:
$ set | grep VSCMD_VER
VSCMD_VER=16.9.1