BUG: Clarified documentation about custom command outputs and custom target dependencies.

This commit is contained in:
Brad King 2006-06-15 10:51:41 -04:00
parent 640c90f068
commit 4c2c2cfd68
2 changed files with 16 additions and 11 deletions

View File

@ -74,7 +74,9 @@ public:
" [WORKING_DIRECTORY dir]\n" " [WORKING_DIRECTORY dir]\n"
" [COMMENT comment])\n" " [COMMENT comment])\n"
"This defines a new command that can be executed during the build " "This defines a new command that can be executed during the build "
"process. Note that MAIN_DEPENDENCY is completely optional and is " "process. The outputs named should be listed as source files in the "
"target for which they are to be generated. "
"Note that MAIN_DEPENDENCY is completely optional and is "
"used as a suggestion to visual studio about where to hang the " "used as a suggestion to visual studio about where to hang the "
"custom command. In makefile terms this creates a new target in the " "custom command. In makefile terms this creates a new target in the "
"following form:\n" "following form:\n"
@ -100,9 +102,9 @@ public:
" POST_BUILD - run after the target has been built\n" " POST_BUILD - run after the target has been built\n"
"Note that the PRE_BUILD option is only supported on Visual " "Note that the PRE_BUILD option is only supported on Visual "
"Studio 7 or later. For all other generators PRE_BUILD " "Studio 7 or later. For all other generators PRE_BUILD "
"will be treated as PRE_LINK." "will be treated as PRE_LINK. "
"If WORKING_DIRECTORY is specified the command a cd \"dir\" is " "If WORKING_DIRECTORY is specified the command will be executed "
"done prior to running the command."; "in the directory given.";
} }
cmTypeMacro(cmAddCustomCommandCommand, cmCommand); cmTypeMacro(cmAddCustomCommandCommand, cmCommand);

View File

@ -68,15 +68,18 @@ public:
" [DEPENDS depend depend depend ... ])\n" " [DEPENDS depend depend depend ... ])\n"
" [WORKING_DIRECTORY dir]\n" " [WORKING_DIRECTORY dir]\n"
"Adds a target with the given name that executes the given commands " "Adds a target with the given name that executes the given commands "
"every time the target is built. If the ALL option is specified " "every time the target is built. If the ALL option is specified "
"it indicates that this target should be added to the default build " "it indicates that this target should be added to the default build "
"target so that it will be run every time. " "target so that it will be run every time "
"The command and arguments are optional. If not specified, " "(the command cannot be called ALL). "
"it will create an empty target. The ADD_DEPENDENCIES command can be " "The command and arguments are optional and if not specified an "
"used in conjunction with this command to drive custom target " "empty target will be created. "
"generation. The command cannot be called ALL. "
"If WORKING_DIRECTORY is set, then the command will be run in that " "If WORKING_DIRECTORY is set, then the command will be run in that "
"directory."; "directory. "
"Dependencies listed with the DEPENDS argument may reference files "
"and outputs of custom commands created with ADD_CUSTOM_COMMAND. "
"Dependencies on other targets may be added using the "
"ADD_DEPENDENCIES command.";
} }
cmTypeMacro(cmAddCustomTargetCommand, cmCommand); cmTypeMacro(cmAddCustomTargetCommand, cmCommand);