1
/*=========================================================================
3
Program: CMake - Cross-Platform Makefile Generator
4
Module: $RCSfile: cmConfigureFileCommand.h,v $
6
Date: $Date: 2008-01-23 15:27:59 $
7
Version: $Revision: 1.22 $
9
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html 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
=========================================================================*/
1
/*============================================================================
2
CMake - Cross Platform Makefile Generator
3
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5
Distributed under the OSI-approved BSD License (the "License");
6
see accompanying file Copyright.txt for details.
8
This software is distributed WITHOUT ANY WARRANTY; without even the
9
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
See the License for more information.
11
============================================================================*/
17
12
#ifndef cmConfigureFileCommand_h
18
13
#define cmConfigureFileCommand_h
60
55
virtual const char* GetFullDocumentation()
63
" configure_file(InputFile OutputFile\n"
58
" configure_file(<input> <output>\n"
64
59
" [COPYONLY] [ESCAPE_QUOTES] [@ONLY])\n"
65
"The Input and Output files have to have full paths. "
60
"Copies a file <input> to file <output> and substitutes variable "
61
"values referenced in the file content. "
62
"If <input> is a relative path it is evaluated with respect to "
63
"the current source directory. "
64
"The <input> must be a file, not a directory. "
65
"If <output> is a relative path it is evaluated with respect to "
66
"the current binary directory. "
67
"If <output> names an existing directory the input file is placed "
68
"in that directory with its original name. "
66
70
"This command replaces any variables in the input file referenced as "
67
71
"${VAR} or @VAR@ with their values as determined by CMake. If a "
68
72
"variable is not defined, it will be replaced with nothing. "
75
79
"This is useful for configuring scripts that use ${VAR}. "
76
80
"Any occurrences of #cmakedefine VAR will be replaced with "
77
81
"either #define VAR or /* #undef VAR */ depending on "
78
"the setting of VAR in CMake";
82
"the setting of VAR in CMake. Any occurrences of #cmakedefine01 VAR "
83
"will be replaced with either #define VAR 1 or #define VAR 0 "
84
"depending on whether VAR evaluates to TRUE or FALSE in CMake";
81
87
virtual void FinalPass();
88
virtual bool HasFinalPass() const { return !this->Immediate; }
83
90
int ConfigureFile();
85
92
std::string InputFile;
86
std::string OuputFile;
93
std::string OutputFile;