FIX: stupid pb fixed (close to being medieval'ed by The Ken)
[cmake.git] / Source / cmCustomCommand.cxx
blob8c839369cae0451421d59952d16904209c61756c
1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmCustomCommand.cxx,v $
5 Language: C++
6 Date: $Date: 2002-01-21 20:30:21 $
7 Version: $Revision: 1.4 $
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 #include "cmCustomCommand.h"
18 #include "cmMakefile.h"
20 /**
21 * The constructor
23 cmCustomCommand::cmCustomCommand(const char *src, const char *command,
24 const char* arguments,
25 std::vector<std::string> dep,
26 std::vector<std::string> out):
27 m_Source(src),
28 m_Command(command),
29 m_Arguments(arguments),
30 m_Depends(dep),
31 m_Outputs(out)
36 /**
37 * Copy constructor.
39 cmCustomCommand::cmCustomCommand(const cmCustomCommand& r):
40 m_Source(r.m_Source),
41 m_Command(r.m_Command),
42 m_Arguments(r.m_Arguments),
43 m_Depends(r.m_Depends),
44 m_Outputs(r.m_Outputs)
48 void cmCustomCommand::ExpandVariables(const cmMakefile &mf)
50 mf.ExpandVariablesInString(m_Source);
51 mf.ExpandVariablesInString(m_Command);
52 mf.ExpandVariablesInString(m_Arguments);
54 for (std::vector<std::string>::iterator i = m_Depends.begin();
55 i != m_Depends.end(); ++i)
57 mf.ExpandVariablesInString(*i);
59 for (std::vector<std::string>::iterator i = m_Outputs.begin();
60 i != m_Outputs.end(); ++i)
62 mf.ExpandVariablesInString(*i);