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

« back to all changes in this revision

Viewing changes to Source/cmMakefile.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: cmMakefile.h,v $
5
 
  Language:  C++
6
 
  Date:      $Date: 2009-02-04 16:44:17 $
7
 
  Version:   $Revision: 1.230.2.8 $
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 cmMakefile_h
18
13
#define cmMakefile_h
19
14
 
41
36
class cmMakeDepend;
42
37
class cmSourceFile;
43
38
class cmTest;
 
39
class cmTestGenerator;
44
40
class cmVariableWatch;
45
41
class cmake;
46
42
class cmMakefileCall;
55
51
 */
56
52
class cmMakefile
57
53
{
 
54
  class Internals;
 
55
  cmsys::auto_ptr<Internals> Internal;
58
56
public:
59
57
  /**
60
58
   * Return the major and minor version of the cmake that
118
116
   */
119
117
  int TryCompile(const char *srcdir, const char *bindir, 
120
118
                 const char *projectName, const char *targetName,
 
119
                 bool fast,
121
120
                 const std::vector<std::string> *cmakeArgs,
122
121
                 std::string *output);
123
122
    
290
289
   * Add bool variable definition to the build. 
291
290
   */
292
291
  void AddDefinition(const char* name, bool);
293
 
  ///! Add a definition to this makefile and the global cmake cache.
294
 
  void AddCacheDefinition(const char* name, bool, const char* doc);
295
292
 
296
293
  /**
297
294
   * Remove a variable definition from the build.  This is not valid
586
583
  bool IsOn(const char* name) const;
587
584
  bool IsSet(const char* name) const;
588
585
 
 
586
  /** Return whether the target platform is 64-bit.  */
 
587
  bool PlatformIs64Bit() const;
 
588
 
589
589
  /**
590
590
   * Get a list of preprocessor define flags.
591
591
   */
769
769
   *  not found, then a null pointer is returned.
770
770
   */
771
771
  cmTest* GetTest(const char* testName) const;
772
 
  const std::vector<cmTest*> *GetTests() const;
773
 
  std::vector<cmTest*> *GetTests();
774
772
 
775
773
  /**
776
774
   * Get a list of macros as a ; separated string
790
788
  const char *GetProperty(const char *prop, cmProperty::ScopeType scope);
791
789
  bool GetPropertyAsBool(const char *prop);
792
790
 
 
791
  const char* GetFeature(const char* feature, const char* config);
 
792
 
793
793
  // Get the properties
794
794
  cmPropertyMap &GetProperties() { return this->Properties; };
795
795
 
796
 
  typedef std::map<cmStdString, cmStdString> DefinitionMap;
797
796
  ///! Initialize a makefile from its parent
798
797
  void InitializeFromParent();
799
798
  
806
805
  std::vector<cmInstallGenerator*>& GetInstallGenerators()
807
806
    { return this->InstallGenerators; }
808
807
 
 
808
  void AddTestGenerator(cmTestGenerator* g)
 
809
    { if(g) this->TestGenerators.push_back(g); }
 
810
  std::vector<cmTestGenerator*>& GetTestGenerators()
 
811
    { return this->TestGenerators; }
 
812
 
809
813
  // Define the properties
810
814
  static void DefineProperties(cmake *cm);
811
815
 
850
854
  std::vector<cmSourceFile*> SourceFiles;
851
855
 
852
856
  // Tests
853
 
  std::vector<cmTest*> Tests;
 
857
  std::map<cmStdString, cmTest*> Tests;
854
858
  
855
859
  // The include and link-library paths.  These may have order
856
860
  // dependency, so they must be vectors (not set).
868
872
  cmTarget::LinkLibraryVectorType LinkLibraries;
869
873
 
870
874
  std::vector<cmInstallGenerator*> InstallGenerators;
 
875
  std::vector<cmTestGenerator*> TestGenerators;
871
876
 
872
877
  std::string IncludeFileRegularExpression;
873
878
  std::string ComplainFileRegularExpression;
884
889
  std::vector<cmSourceGroup> SourceGroups;
885
890
#endif
886
891
 
887
 
  std::vector<DefinitionMap> DefinitionStack;
888
892
  std::vector<cmCommand*> UsedCommands;
889
893
  cmLocalGenerator* LocalGenerator;
890
894
  bool IsFunctionBlocked(const cmListFileFunction& lff, 
895
899
 
896
900
  bool ParseDefineFlag(std::string const& definition, bool remove);
897
901
 
 
902
  bool EnforceUniqueDir(const char* srcPath, const char* binPath);
 
903
 
898
904
  void ReadSources(std::ifstream& fin, bool t);
899
905
  friend class cmMakeDepend;    // make depend needs direct access
900
906
                                // to the Sources array 
917
923
  StringStringMap MacrosMap;
918
924
 
919
925
  std::map<cmStdString, bool> SubDirectoryOrder;
920
 
  // used in AddDefinition for performance improvement
921
 
  DefinitionMap::key_type  TemporaryDefinitionKey;
922
926
 
923
927
  cmsys::RegularExpression cmDefineRegex;
924
928
  cmsys::RegularExpression cmDefine01Regex;