summaryrefslogtreecommitdiffstats
path: root/Source/cmForEachCommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmForEachCommand.h')
-rw-r--r--Source/cmForEachCommand.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h
index 3e03711..ea7faa5 100644
--- a/Source/cmForEachCommand.h
+++ b/Source/cmForEachCommand.h
@@ -94,14 +94,14 @@ public:
" COMMAND2(ARGS ...)\n"
" ...\n"
" endforeach(loop_var)\n"
- " foreach(loop_var RANGE total)\n"
- " foreach(loop_var RANGE start stop [step])\n"
"All commands between foreach and the matching endforeach are recorded "
"without being invoked. Once the endforeach is evaluated, the "
"recorded list of commands is invoked once for each argument listed "
"in the original foreach command. Before each iteration of the loop "
"\"${loop_var}\" will be set as a variable with "
"the current value in the list.\n"
+ " foreach(loop_var RANGE total)\n"
+ " foreach(loop_var RANGE start stop [step])\n"
"Foreach can also iterate over a generated range of numbers. "
"There are three types of this iteration:\n"
"* When specifying single number, the range will have elements "
@@ -109,10 +109,21 @@ public:
"* When specifying two numbers, the range will have elements from "
"the first number to the second number.\n"
"* The third optional number is the increment used to iterate from "
- "the first number to the second number.";
+ "the first number to the second number."
+ "\n"
+ " foreach(loop_var IN [LISTS [list1 [...]]]\n"
+ " [ITEMS [item1 [...]]])\n"
+ "Iterates over a precise list of items. "
+ "The LISTS option names list-valued variables to be traversed, "
+ "including empty elements (an empty string is a zero-length list). "
+ "The ITEMS option ends argument parsing and includes all arguments "
+ "following it in the iteration."
+ ;
}
cmTypeMacro(cmForEachCommand, cmCommand);
+private:
+ bool HandleInMode(std::vector<std::string> const& args);
};