1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmCustomCommand.cxx,v $
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"
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
):
29 m_Arguments(arguments
),
39 cmCustomCommand::cmCustomCommand(const cmCustomCommand
& r
):
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
);