CetRegexEscape¶
Define the functions cet_regex_escape()
and
cet_armor_string()
to protect characters in strings from
unwanted interpolation or interpretation by CMake.
- cet_armor_string¶
Armor escaped characters against macro interpolation.
cet_armor_string(<val> <var> [<num>]) cet_armor_string(<val> ... VAR <var> [NUM <num>])
Options¶
[VAR ]<var>
Return the armored string in
var
. Use of the keyword allows specification of a list of<val>
rather than a single value.[NUM ]<num>
Armor against
<num>
levels of interpolation (default 1).
- cet_regex_escape¶
Protect characters in a string or list of strings from interpretation as regex special characters by CMake.
cet_regex_escape(<val> <var> [<num>]) cet_regex_escape(<val> ... VAR <var> [NUM <num>])
Options¶
[VAR ]<var>
Return the protected string in
var
. Use of the keyword allows specification of a list of<val>
rather than a single value.[NUM ]<num>
Armor escaped characters against macro interpolation.
See also
cet_armor_string.