summaryrefslogtreecommitdiffstats
path: root/Source/cmStringCommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmStringCommand.h')
-rw-r--r--Source/cmStringCommand.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index 91463c4..cbdf811 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -71,6 +71,9 @@ public:
" STRING(REGEX REPLACE <regular_expression>\n"
" <replace_expression> <output variable>\n"
" <input> [<input>...])\n"
+ " STRING(REPLACE <match_expression>\n"
+ " <replace_expression> <output variable>\n"
+ " <input> [<input>...])\n"
" STRING(COMPARE EQUAL <string1> <string2> <output variable>)\n"
" STRING(COMPARE NOTEQUAL <string1> <string2> <output variable>)\n"
" STRING(COMPARE LESS <string1> <string2> <output variable>)\n"
@@ -90,6 +93,12 @@ public:
"subexpressions of the match using \\1, \\2, ..., \\9. Note that "
"two backslashes (\\\\1) are required in CMake code to get a "
"backslash through argument parsing.\n"
+ "REPLACE will match the given expression "
+ "and substitute the replacement expression for the match "
+ "in the output. The replace expression may refer to paren-delimited "
+ "subexpressions of the match using \\1, \\2, ..., \\9. Note that "
+ "two backslashes (\\\\1) are required in CMake code to get a "
+ "backslash through argument parsing.\n"
"COMPARE EQUAL/NOTEQUAL/LESS/GREATER will compare the strings and "
"store true or false in the output variable.\n"
"ASCII will convert all numbers into corresponding ASCII characters.\n"
@@ -108,6 +117,7 @@ protected:
bool RegexReplace(std::vector<std::string> const& args);
bool HandleToUpperLowerCommand(std::vector<std::string> const& args, bool toUpper);
bool HandleCompareCommand(std::vector<std::string> const& args);
+ bool HandleReplaceCommand(std::vector<std::string> const& args);
class RegexReplacement
{