summaryrefslogtreecommitdiffstats
path: root/Source/cmForEachCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-02-14 23:47:16 (GMT)
committerBrad King <brad.king@kitware.com>2003-02-14 23:47:16 (GMT)
commita02574158d178615cf8fd642695e5099b6041049 (patch)
treedf9f52770e9c2ff771988ae1a91ec0b2287548da /Source/cmForEachCommand.h
parentdec0b5106611cbccd1f75c1fa3371d66bdd69a47 (diff)
downloadCMake-a02574158d178615cf8fd642695e5099b6041049.zip
CMake-a02574158d178615cf8fd642695e5099b6041049.tar.gz
CMake-a02574158d178615cf8fd642695e5099b6041049.tar.bz2
ENH: Cleaned up documentation and formatted it for use by cmDocumentation.
Diffstat (limited to 'Source/cmForEachCommand.h')
-rw-r--r--Source/cmForEachCommand.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h
index 95911e6..f790756 100644
--- a/Source/cmForEachCommand.h
+++ b/Source/cmForEachCommand.h
@@ -80,7 +80,7 @@ public:
*/
virtual const char* GetTerseDocumentation()
{
- return "start a foreach loop";
+ return "Evaluate a group of commands for each value in a list.";
}
/**
@@ -89,7 +89,17 @@ public:
virtual const char* GetFullDocumentation()
{
return
- "FOREACH (define arg1 arg2 arg2) Starts a foreach block.";
+ " FOREACH(loop_var arg1 arg2 ...)\n"
+ " COMMAND1(ARGS ...)\n"
+ " COMMAND2(ARGS ...)\n"
+ " ...\n"
+ " ENDFOREACH(loop_var)\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. Each recorded command is modified "
+ "before invocation to replace any occurrence of \"${loop_var}\" with "
+ "the current value in the list.";
}
cmTypeMacro(cmForEachCommand, cmCommand);