FIX: stupid pb fixed (close to being medieval'ed by The Ken)
[cmake.git] / Source / cmCustomCommand.h
blobc88838ccf5bb6ffc5331863de8983cb2df25b5bc
1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmCustomCommand.h,v $
5 Language: C++
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"
21 class cmMakefile;
23 /** \class cmCustomCommand
24 * \brief A class to encapsulate a custom command
26 * cmCustomCommand encapsulates the properties of a custom command
28 class cmCustomCommand
30 public:
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);
37 /**
38 * Use the cmMakefile's Expand commands to expand any variables in
39 * this objects members.
41 void ExpandVariables(const cmMakefile &);
43 /**
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;}
61 /**
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;}
67 /**
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;}
73 private:
74 std::string m_Source;
75 std::string m_Command;
76 std::string m_Arguments;
77 std::vector<std::string> m_Depends;
78 std::vector<std::string> m_Outputs;
82 #endif