1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmConfigureFileCommand.h,v $
6 Date: $Date: 2002-01-21 20:30:21 $
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 cmConfigureFileCommand_h
18 #define cmConfigureFileCommand_h
20 #include "cmStandardIncludes.h"
21 #include "cmCommand.h"
23 class cmConfigureFileCommand
: public cmCommand
26 virtual cmCommand
* Clone()
28 return new cmConfigureFileCommand
;
32 * This is called when the command is first encountered in
35 virtual bool InitialPass(std::vector
<std::string
> const& args
);
38 * The name of the command as specified in CMakeList.txt.
40 virtual const char* GetName() { return "CONFIGURE_FILE";}
43 * Succinct documentation.
45 virtual const char* GetTerseDocumentation()
47 return "Create a file from an autoconf style file.in file.";
51 * Longer documentation.
53 virtual const char* GetFullDocumentation()
56 "CONFIGURE_FILE(InputFile OutputFile [COPYONLY] [ESCAPE_QUOTES] [IMMEDIATE] [@ONLY])\n"
57 "The Input and Ouput files have to have full paths.\n"
58 "They can also use variables like CMAKE_BINARY_DIR,CMAKE_SOURCE_DIR. "
59 "This command replaces any variables in the input file with their "
60 "values as determined by CMake. If a variables in not defined, it "
61 "will be replaced with nothing. If COPYONLY is passed in, then "
62 "then no varible expansion will take place. If ESCAPE_QUOTES is "
63 "passed in then any substitued quotes will be C style escaped. "
64 "If IMMEDIATE is specified, then the file will be configured with "
65 "the current values of CMake variables instead of waiting until the "
66 "end of CMakeLists processing. If @ONLY is present, only variables "
67 "of the form @var@ will be replaces and ${var} will be ignored. "
68 "This is useful for configuring tcl scripts that use ${var}.";
71 virtual void FinalPass();
75 std::string m_InputFile
;
76 std::string m_OuputFile
;