summaryrefslogtreecommitdiffstats
path: root/Source/cmStringCommand.h
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-11-06 15:07:10 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-11-06 15:07:10 (GMT)
commitd6fe0438c1d5c6ecd5ebc0377781175ce14ac251 (patch)
tree7ac99f9ad88911211a8c003f2f19d2b4754f1543 /Source/cmStringCommand.h
parent10762565e95b9cac08b7a0b643fdc5bf39bb2b96 (diff)
downloadCMake-d6fe0438c1d5c6ecd5ebc0377781175ce14ac251.zip
CMake-d6fe0438c1d5c6ecd5ebc0377781175ce14ac251.tar.gz
CMake-d6fe0438c1d5c6ecd5ebc0377781175ce14ac251.tar.bz2
Fix issue #9851 - only seed the random number generator on the first call to STRING(RANDOM or if given the new RANDOM_SEED argument. Add test and documentation of new argument.
Diffstat (limited to 'Source/cmStringCommand.h')
-rw-r--r--Source/cmStringCommand.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index 6e4bd86..2a916b4 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -89,7 +89,7 @@ public:
" string(SUBSTRING <string> <begin> <length> <output variable>)\n"
" string(STRIP <string> <output variable>)\n"
" string(RANDOM [LENGTH <length>] [ALPHABET <alphabet>]\n"
- " <output variable>)\n"
+ " [RANDOM_SEED <seed>] <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 "
@@ -115,7 +115,8 @@ public:
"RANDOM will return a random string of given length consisting of "
"characters from the given alphabet. Default length is 5 "
"characters and default alphabet is all numbers and upper and "
- "lower case letters.\n"
+ "lower case letters. If an integer RANDOM_SEED is given, its "
+ "value will be used to seed the random number generator.\n"
"The following characters have special meaning in regular expressions:\n"
" ^ Matches at beginning of a line\n"
" $ Matches at end of a line\n"