|
@@ -98,12 +98,22 @@ public:
|
|
|
" COMMAND2(ARGS ...)\n"
|
|
" COMMAND2(ARGS ...)\n"
|
|
|
" ...\n"
|
|
" ...\n"
|
|
|
" ENDFOREACH(loop_var)\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 "
|
|
"All commands between FOREACH and the matching ENDFOREACH are recorded "
|
|
|
"without being invoked. Once the ENDFOREACH is evaluated, the "
|
|
"without being invoked. Once the ENDFOREACH is evaluated, the "
|
|
|
"recorded list of commands is invoked once for each argument listed "
|
|
"recorded list of commands is invoked once for each argument listed "
|
|
|
"in the original FOREACH command. Each recorded command is modified "
|
|
"in the original FOREACH command. Each recorded command is modified "
|
|
|
"before invocation to replace any occurrence of \"${loop_var}\" with "
|
|
"before invocation to replace any occurrence of \"${loop_var}\" with "
|
|
|
- "the current value in the list.";
|
|
|
|
|
|
|
+ "the current value in the list.\n"
|
|
|
|
|
+ "Foreach can also iterate over the range of numbers generated by "
|
|
|
|
|
+ "foreach. There are three types of this iteration:\n"
|
|
|
|
|
+ "* When specifying single number, the range will have elements "
|
|
|
|
|
+ "0 to \"total\".\n"
|
|
|
|
|
+ "* 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.";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
cmTypeMacro(cmForEachCommand, cmCommand);
|
|
cmTypeMacro(cmForEachCommand, cmCommand);
|