1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmCustomCommand.h,v $
6 Date: $Date: 2002-01-21 20:30:21 $
7 Version: $Revision: 1.5 $
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 cmCustomCommand_h
18 #define cmCustomCommand_h
20 #include "cmStandardIncludes.h"
23 /** \class cmCustomCommand
24 * \brief A class to encapsulate a custom command
26 * cmCustomCommand encapsulates the properties of a custom command
31 cmCustomCommand(const char *src
, const char *command
,
32 const char* arguments
,
33 std::vector
<std::string
> dep
,
34 std::vector
<std::string
> out
);
35 cmCustomCommand(const cmCustomCommand
& r
);
38 * Use the cmMakefile's Expand commands to expand any variables in
39 * this objects members.
41 void ExpandVariables(const cmMakefile
&);
44 * Return the name of the source file. I'm not sure if this is a full path or not.
46 std::string
GetSourceName() const {return m_Source
;}
47 void SetSourceName(const char *name
) {m_Source
= name
;}
49 ///! Return the command to execute with arguments
50 std::string
GetCommandAndArguments() const
51 {return m_Command
+ " " + m_Arguments
;}
53 ///! Return the command to execute
54 std::string
GetCommand() const {return m_Command
;}
55 void SetCommand(const char *cmd
) {m_Command
= cmd
;}
57 ///! Return the commands arguments
58 std::string
GetArguments() const {return m_Arguments
;}
59 void SetArguments(const char *arg
) {m_Arguments
= arg
;}
62 * Return the vector that holds the list of dependencies
64 const std::vector
<std::string
> &GetDepends() const {return m_Depends
;}
65 std::vector
<std::string
> &GetDepends() {return m_Depends
;}
68 * Return the vector that holds the list of outputs of this command
70 const std::vector
<std::string
> &GetOutputs() const {return m_Outputs
;}
71 std::vector
<std::string
> &GetOutputs() {return m_Outputs
;}
75 std::string m_Command
;
76 std::string m_Arguments
;
77 std::vector
<std::string
> m_Depends
;
78 std::vector
<std::string
> m_Outputs
;