diff options
| author | Jan200101 <sentrycraft123@gmail.com> | 2025-05-31 17:26:33 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-06-08 23:51:31 +0300 |
| commit | 07cd9bc16b0c2215b5d835d738e48085baa8f251 (patch) | |
| tree | 564a56861a1331addb1d94a483a62d04e82d9402 /mesonbuild/utils/universal.py | |
| parent | 1fd839ef555ec3a8d0237fc6b1d5f4be93f0ca29 (diff) | |
| download | meson-07cd9bc16b0c2215b5d835d738e48085baa8f251.tar.gz | |
handle empty curly braces correctly
in cmake variables are pure strings with no minimal required length so
an empty string is a valid key and ${} needs to be handled accordingly.
Diffstat (limited to 'mesonbuild/utils/universal.py')
| -rw-r--r-- | mesonbuild/utils/universal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py index fc9a435ed..bf08fd7a2 100644 --- a/mesonbuild/utils/universal.py +++ b/mesonbuild/utils/universal.py @@ -1401,7 +1401,7 @@ def get_variable_regex(variable_format: Literal['meson', 'cmake', 'cmake@'] = 'm | # OR \\\${ # Match a backslash followed by a dollar sign and an opening curly brace | # OR - \${(?P<cmake_variable>[-a-zA-Z0-9_]+)} # Match a variable enclosed in curly braces and capture the variable name + \${(?P<cmake_variable>[-a-zA-Z0-9_]*)} # Match a variable enclosed in curly braces and capture the variable name | # OR (?<!\\)@(?P<variable>[-a-zA-Z0-9_]+)@ # Match a variable enclosed in @ symbols and capture the variable name; no matches beginning with '\@' | # OR |
