BUG: fix some bad changes in progress calc
[cmake.git] / Source / cmGlobalVisualStudio7Generator.h
blob5c3ff90215fa5c51dbc1901fd7e55ed9879b7814
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmGlobalVisualStudio7Generator.h,v $
5 Language: C++
6 Date: $Date: 2008-01-31 21:38:45 $
7 Version: $Revision: 1.45 $
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 =========================================================================*/
17 #ifndef cmGlobalVisualStudio7Generator_h
18 #define cmGlobalVisualStudio7Generator_h
20 #include "cmGlobalVisualStudioGenerator.h"
22 class cmTarget;
23 struct cmVS7FlagTable;
25 /** \class cmGlobalVisualStudio7Generator
26 * \brief Write a Unix makefiles.
28 * cmGlobalVisualStudio7Generator manages UNIX build process for a tree
30 class cmGlobalVisualStudio7Generator : public cmGlobalVisualStudioGenerator
32 public:
33 cmGlobalVisualStudio7Generator();
34 static cmGlobalGenerator* New() {
35 return new cmGlobalVisualStudio7Generator; }
37 ///! Get the name for the generator.
38 virtual const char* GetName() const {
39 return cmGlobalVisualStudio7Generator::GetActualName();}
40 static const char* GetActualName() {return "Visual Studio 7";}
42 ///! Create a local generator appropriate to this Global Generator
43 virtual cmLocalGenerator *CreateLocalGenerator();
45 /** Get the documentation entry for this generator. */
46 virtual void GetDocumentation(cmDocumentationEntry& entry) const;
48 /**
49 * Try to determine system infomation such as shared library
50 * extension, pthreads, byte order etc.
52 virtual void EnableLanguage(std::vector<std::string>const& languages,
53 cmMakefile *, bool optional);
55 /**
56 * Try running cmake and building a file. This is used for dynalically
57 * loaded commands, not as part of the usual build process.
59 virtual std::string GenerateBuildCommand(const char* makeProgram,
60 const char *projectName,
61 const char* additionalOptions,
62 const char *targetName,
63 const char* config,
64 bool ignoreErrors,
65 bool fast);
67 /**
68 * Generate the all required files for building this project/tree. This
69 * basically creates a series of LocalGenerators for each directory and
70 * requests that they Generate.
72 virtual void Generate();
74 /**
75 * Generate the DSW workspace file.
77 virtual void OutputSLNFile();
79 /**
80 * Get the list of configurations
82 std::vector<std::string> *GetConfigurations();
84 ///! Create a GUID or get an existing one.
85 void CreateGUID(const char* name);
86 std::string GetGUID(const char* name);
88 ///! do configure step
89 virtual void Configure();
91 /** Append the subdirectory for the given configuration. */
92 virtual void AppendDirectoryForConfig(const char* prefix,
93 const char* config,
94 const char* suffix,
95 std::string& dir);
97 ///! What is the configurations directory variable called?
98 virtual const char* GetCMakeCFGInitDirectory() { return "$(OutDir)"; }
100 protected:
101 static cmVS7FlagTable const* GetExtraFlagTableVS7();
102 virtual void OutputSLNFile(cmLocalGenerator* root,
103 std::vector<cmLocalGenerator*>& generators);
104 virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root,
105 std::vector<cmLocalGenerator*>& generators);
106 virtual void WriteProject(std::ostream& fout,
107 const char* name, const char* path, cmTarget &t);
108 virtual void WriteProjectDepends(std::ostream& fout,
109 const char* name, const char* path, cmTarget &t);
110 virtual void WriteProjectConfigurations(std::ostream& fout,
111 const char* name,
112 bool partOfDefaultBuild);
113 virtual void WriteSLNFooter(std::ostream& fout);
114 virtual void WriteSLNHeader(std::ostream& fout);
115 virtual void AddPlatformDefinitions(cmMakefile* mf);
117 virtual void WriteTargetsToSolution(
118 std::ostream& fout,
119 cmLocalGenerator* root,
120 cmGlobalGenerator::TargetDependSet& projectTargets,
121 cmGlobalGenerator::TargetDependSet& originalTargets);
122 virtual void WriteTargetDepends(
123 std::ostream& fout,
124 cmGlobalGenerator::TargetDependSet& projectTargets);
125 virtual void WriteTargetConfigurations(
126 std::ostream& fout,
127 cmLocalGenerator* root,
128 cmGlobalGenerator::TargetDependSet& projectTargets);
130 void AddAllBuildDepends(cmLocalGenerator* root,
131 cmTarget* target,
132 cmGlobalGenerator::TargetDependSet& targets);
134 void GenerateConfigurations(cmMakefile* mf);
136 virtual void WriteExternalProject(std::ostream& fout,
137 const char* name,
138 const char* path,
139 const std::vector<std::string>&
140 dependencies);
142 std::string ConvertToSolutionPath(const char* path);
144 bool IsPartOfDefaultBuild(const char* project,
145 cmTarget* target);
146 std::vector<std::string> Configurations;
147 std::map<cmStdString, cmStdString> GUIDMap;
149 // Set during OutputSLNFile with the name of the current project.
150 // There is one SLN file per project.
151 std::string CurrentProject;
154 #define CMAKE_CHECK_BUILD_SYSTEM_TARGET "ZERO_CHECK"
156 #endif