1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmExecProgramCommand.h,v $
6 Date: $Date: 2002-04-03 21:14:06 $
7 Version: $Revision: 1.7 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmExecProgramCommand_h
18 #define cmExecProgramCommand_h
20 #include "cmStandardIncludes.h"
21 #include "cmCommand.h"
23 /** \class cmExecProgramCommand
24 * \brief Command that adds a target to the build system.
26 * cmExecProgramCommand adds an extra target to the build system.
27 * This is useful when you would like to add special
28 * targets like "install,", "clean," and so on.
30 class cmExecProgramCommand
: public cmCommand
34 * This is a virtual constructor for the command.
36 virtual cmCommand
* Clone()
38 return new cmExecProgramCommand
;
42 * This is called when the command is first encountered in
43 * the CMakeLists.txt file.
45 virtual bool InitialPass(std::vector
<std::string
> const& args
);
48 * The name of the command as specified in CMakeList.txt.
50 virtual const char* GetName()
51 {return "EXEC_PROGRAM";}
54 * Succinct documentation.
56 virtual const char* GetTerseDocumentation()
58 return "Run and executable program during the processing of the CMakeList.txt file.";
64 virtual const char* GetFullDocumentation()
67 "EXEC_PROGRAM(Executable [Directory to run in] [ARGS arguments to executable])"
68 "The executable is run in the optionally specified Directory. The executable "
69 "can include arguments if it is double quoted, but it is better to use the "
70 "optional ARGS argument to specify arguments to the program. This is because "
71 "cmake will then be able to escape spaces in the Executable path.";
74 cmTypeMacro(cmExecProgramCommand
, cmCommand
);