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 ============================================================================*/
12 #ifndef cmGlobalVisualStudio6Generator_h
13 #define cmGlobalVisualStudio6Generator_h
15 #include "cmGlobalVisualStudioGenerator.h"
16 #include "cmGlobalGeneratorFactory.h"
20 /** \class cmGlobalVisualStudio6Generator
21 * \brief Write a Unix makefiles.
23 * cmGlobalVisualStudio6Generator manages UNIX build process for a tree
25 class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator
28 cmGlobalVisualStudio6Generator();
29 static cmGlobalGeneratorFactory* NewFactory() {
30 return new cmGlobalGeneratorSimpleFactory
31 <cmGlobalVisualStudio6Generator>(); }
33 ///! Get the name for the generator.
34 virtual const char* GetName() const {
35 return cmGlobalVisualStudio6Generator::GetActualName();}
36 static const char* GetActualName() {return "Visual Studio 6";}
38 /** Get the documentation entry for this generator. */
39 static void GetDocumentation(cmDocumentationEntry& entry);
41 ///! Create a local generator appropriate to this Global Generator
42 virtual cmLocalGenerator *CreateLocalGenerator();
45 * Try to determine system infomation such as shared library
46 * extension, pthreads, byte order etc.
48 virtual void EnableLanguage(std::vector<std::string>const& languages,
49 cmMakefile *, bool optional);
52 * Try running cmake and building a file. This is used for dynalically
53 * loaded commands, not as part of the usual build process.
55 virtual std::string GenerateBuildCommand(const char* makeProgram,
56 const char *projectName,
57 const char *projectDir,
58 const char* additionalOptions,
59 const char *targetName,
65 * Generate the all required files for building this project/tree. This
66 * basically creates a series of LocalGenerators for each directory and
67 * requests that they Generate.
69 virtual void Generate();
72 * Generate the DSW workspace file.
74 virtual void OutputDSWFile();
75 virtual void OutputDSWFile(cmLocalGenerator* root,
76 std::vector<cmLocalGenerator*>& generators);
77 virtual void WriteDSWFile(std::ostream& fout,
78 cmLocalGenerator* root,
79 std::vector<cmLocalGenerator*>& generators);
81 /** Append the subdirectory for the given configuration. */
82 virtual void AppendDirectoryForConfig(const char* prefix,
87 ///! What is the configurations directory variable called?
88 virtual const char* GetCMakeCFGIntDir() const { return "$(IntDir)"; }
91 virtual const char* GetIDEVersion() { return "6.0"; }
93 void GenerateConfigurations(cmMakefile* mf);
94 void WriteDSWFile(std::ostream& fout);
95 void WriteDSWHeader(std::ostream& fout);
96 void WriteProject(std::ostream& fout,
97 const char* name, const char* path, cmTarget &t);
98 void WriteExternalProject(std::ostream& fout,
99 const char* name, const char* path,
100 const std::set<cmStdString>& dependencies);
101 void WriteDSWFooter(std::ostream& fout);
102 virtual std::string WriteUtilityDepend(cmTarget* target);