5009f2960e8c3cf5927b86cd2347c8d260f6a578
[platform/upstream/cmake.git] / Source / cmGlobalVisualStudio8Generator.h
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 ============================================================================*/
12 #ifndef cmGlobalVisualStudio8Generator_h
13 #define cmGlobalVisualStudio8Generator_h
14
15 #include "cmGlobalVisualStudio71Generator.h"
16
17
18 /** \class cmGlobalVisualStudio8Generator
19  * \brief Write a Unix makefiles.
20  *
21  * cmGlobalVisualStudio8Generator manages UNIX build process for a tree
22  */
23 class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
24 {
25 public:
26   cmGlobalVisualStudio8Generator();
27   static cmGlobalGenerator* New() {
28     return new cmGlobalVisualStudio8Generator; }
29
30   ///! Get the name for the generator.
31   virtual const char* GetName() const {
32     return cmGlobalVisualStudio8Generator::GetActualName();}
33   static const char* GetActualName() {return "Visual Studio 8 2005";}
34
35   virtual const char* GetPlatformName() const {return "Win32";}
36
37   /** Get the documentation entry for this generator.  */
38   virtual void GetDocumentation(cmDocumentationEntry& entry) const;
39
40   ///! Create a local generator appropriate to this Global Generator
41   virtual cmLocalGenerator *CreateLocalGenerator();
42
43   /**
44    * Override Configure and Generate to add the build-system check
45    * target.
46    */
47   virtual void Configure();
48   virtual void Generate();
49
50   /**
51    * Where does this version of Visual Studio look for macros for the
52    * current user? Returns the empty string if this version of Visual
53    * Studio does not implement support for VB macros.
54    */
55   virtual std::string GetUserMacrosDirectory();
56
57   /**
58    * What is the reg key path to "vsmacros" for this version of Visual
59    * Studio?
60    */
61   virtual std::string GetUserMacrosRegKeyBase();
62
63   /** Return true if the target project file should have the option
64       LinkLibraryDependencies and link to .sln dependencies. */
65   virtual bool NeedLinkLibraryDependencies(cmTarget& target);
66
67 protected:
68   virtual const char* GetIDEVersion() { return "8.0"; }
69
70   virtual bool VSLinksDependencies() const { return false; }
71
72   void AddCheckTarget();
73
74   static cmIDEFlagTable const* GetExtraFlagTableVS8();
75   virtual void WriteSLNHeader(std::ostream& fout);
76   virtual void WriteSolutionConfigurations(std::ostream& fout);
77   virtual void WriteProjectConfigurations(std::ostream& fout,
78                                           const char* name,
79                                           bool partOfDefaultBuild,
80                                           const char* platformMapping = NULL);
81   virtual bool ComputeTargetDepends();
82   virtual void WriteProjectDepends(std::ostream& fout, const char* name,
83                                    const char* path, cmTarget &t);
84 };
85 #endif