summaryrefslogtreecommitdiffstats
path: root/Source/cmStringCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-12-04 23:44:39 (GMT)
committerBrad King <brad.king@kitware.com>2002-12-04 23:44:39 (GMT)
commitd66aa2262ab04f695aa4f9869cd7ffa4450b3ac3 (patch)
tree2c9fcb04b0b94f8b337fd30465411cdf5cb6c684 /Source/cmStringCommand.h
parent9992fe5103d8d55d65e2dc0ae3ce9458a47832c7 (diff)
downloadCMake-d66aa2262ab04f695aa4f9869cd7ffa4450b3ac3.zip
CMake-d66aa2262ab04f695aa4f9869cd7ffa4450b3ac3.tar.gz
CMake-d66aa2262ab04f695aa4f9869cd7ffa4450b3ac3.tar.bz2
ENH: Added COMPARE modes to STRING command.
Diffstat (limited to 'Source/cmStringCommand.h')
-rw-r--r--Source/cmStringCommand.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index dfb033d..c78f3ac 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -63,11 +63,16 @@ public:
"STRING(REGEX MATCH <regular_expression> <output variable> <input> [<input>...])\n"
"STRING(REGEX MATCHALL <regular_expression> <output variable> <input> [<input>...])\n"
"STRING(REGEX REPLACE <regular_expression> <replace_expression> <output variable> <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"
+ "STRING(COMPARE GREATER <string1> <string2> <output variable>)\n"
"REGEX MATCH will match the regular expression once and store the match in the output variable.\n"
"REGEX MATCHALL will match the regular expression as many times as possible and store the matches\n"
" in the output variable as a list.\n"
"REGEX REPLACE will match the regular expression as many times as possible and substitute the\n"
- " replacement expression for the match in the output.\n";
+ " replacement expression for the match in the output.\n"
+ "COMPARE EQUAL/NOTEQUAL/LESS/GREATER will compare the strings and store true or false in the output variable.\n";
}
cmTypeMacro(cmStringCommand, cmCommand);
@@ -76,6 +81,7 @@ protected:
bool RegexMatch(std::vector<std::string> const& args);
bool RegexMatchAll(std::vector<std::string> const& args);
bool RegexReplace(std::vector<std::string> const& args);
+ bool HandleCompareCommand(std::vector<std::string> const& args);
class RegexReplacement
{