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"
19 /** \class cmGlobalVisualStudio6Generator
20 * \brief Write a Unix makefiles.
22 * cmGlobalVisualStudio6Generator manages UNIX build process for a tree
24 class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator
27 cmGlobalVisualStudio6Generator();
28 static cmGlobalGenerator* New() {
29 return new cmGlobalVisualStudio6Generator; }
31 ///! Get the name for the generator.
32 virtual const char* GetName() const {
33 return cmGlobalVisualStudio6Generator::GetActualName();}
34 static const char* GetActualName() {return "Visual Studio 6";}
36 /** Get the documentation entry for this generator. */
37 virtual void GetDocumentation(cmDocumentationEntry& entry) const;
39 ///! Create a local generator appropriate to this Global Generator
40 virtual cmLocalGenerator *CreateLocalGenerator();
43 * Try to determine system infomation such as shared library
44 * extension, pthreads, byte order etc.
46 virtual void EnableLanguage(std::vector<std::string>const& languages,
47 cmMakefile *, bool optional);
50 * Try running cmake and building a file. This is used for dynalically
51 * loaded commands, not as part of the usual build process.
53 virtual std::string GenerateBuildCommand(const char* makeProgram,
54 const char *projectName,
55 const char* additionalOptions,
56 const char *targetName,
62 * Generate the all required files for building this project/tree. This
63 * basically creates a series of LocalGenerators for each directory and
64 * requests that they Generate.
66 virtual void Generate();
69 * Generate the DSW workspace file.
71 virtual void OutputDSWFile();
72 virtual void OutputDSWFile(cmLocalGenerator* root,
73 std::vector<cmLocalGenerator*>& generators);
74 virtual void WriteDSWFile(std::ostream& fout,
75 cmLocalGenerator* root,
76 std::vector<cmLocalGenerator*>& generators);
78 /** Append the subdirectory for the given configuration. */
79 virtual void AppendDirectoryForConfig(const char* prefix,
84 ///! What is the configurations directory variable called?
85 virtual const char* GetCMakeCFGIntDir() const { return "$(IntDir)"; }
88 virtual const char* GetIDEVersion() { return "6.0"; }
90 void GenerateConfigurations(cmMakefile* mf);
91 void WriteDSWFile(std::ostream& fout);
92 void WriteDSWHeader(std::ostream& fout);
93 void WriteProject(std::ostream& fout,
94 const char* name, const char* path, cmTarget &t);
95 void WriteExternalProject(std::ostream& fout,
96 const char* name, const char* path,
97 const std::set<cmStdString>& dependencies);
98 void WriteDSWFooter(std::ostream& fout);
99 virtual std::string WriteUtilityDepend(cmTarget* target);