~ubuntu-branches/ubuntu/lucid/cmake/lucid

« back to all changes in this revision

Viewing changes to Source/cmConfigureFileCommand.h

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2009-12-16 11:11:54 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091216111154-6accvv6yq86h2hkc
Tags: 2.8.0-5ubuntu1
* Merge from debian testing (LP: #497349). Remaining changes:
  - Keep the Replaces: on cmake-data to cover the Kubuntu version from
    Jaunty in case someone decides to do an (unsupported) Jaunty->Lucid
    upgrade.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*=========================================================================
2
 
 
3
 
  Program:   CMake - Cross-Platform Makefile Generator
4
 
  Module:    $RCSfile: cmConfigureFileCommand.h,v $
5
 
  Language:  C++
6
 
  Date:      $Date: 2008-01-23 15:27:59 $
7
 
  Version:   $Revision: 1.22 $
8
 
 
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.
11
 
 
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.
15
 
 
16
 
=========================================================================*/
 
1
/*============================================================================
 
2
  CMake - Cross Platform Makefile Generator
 
3
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
 
4
 
 
5
  Distributed under the OSI-approved BSD License (the "License");
 
6
  see accompanying file Copyright.txt for details.
 
7
 
 
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
19
14
 
60
55
  virtual const char* GetFullDocumentation()
61
56
    {
62
57
      return
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.  "
 
69
        "\n"
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";
79
85
    }
80
86
 
81
87
  virtual void FinalPass();
 
88
  virtual bool HasFinalPass() const { return !this->Immediate; }
82
89
private:
83
90
  int ConfigureFile();
84
91
  
85
92
  std::string InputFile;
86
 
  std::string OuputFile;
 
93
  std::string OutputFile;
87
94
  bool CopyOnly;
88
95
  bool EscapeQuotes;
89
96
  bool Immediate;