cmGlobalVisualStudio6Generator.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmGlobalVisualStudio6Generator_h
  11. #define cmGlobalVisualStudio6Generator_h
  12. #include "cmGlobalVisualStudioGenerator.h"
  13. class cmTarget;
  14. /** \class cmGlobalVisualStudio6Generator
  15. * \brief Write a Unix makefiles.
  16. *
  17. * cmGlobalVisualStudio6Generator manages UNIX build process for a tree
  18. */
  19. class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator
  20. {
  21. public:
  22. cmGlobalVisualStudio6Generator();
  23. static cmGlobalGenerator* New() {
  24. return new cmGlobalVisualStudio6Generator; }
  25. ///! Get the name for the generator.
  26. virtual const char* GetName() const {
  27. return cmGlobalVisualStudio6Generator::GetActualName();}
  28. static const char* GetActualName() {return "Visual Studio 6";}
  29. /** Get the documentation entry for this generator. */
  30. virtual void GetDocumentation(cmDocumentationEntry& entry) const;
  31. ///! Create a local generator appropriate to this Global Generator
  32. virtual cmLocalGenerator *CreateLocalGenerator();
  33. /**
  34. * Try to determine system infomation such as shared library
  35. * extension, pthreads, byte order etc.
  36. */
  37. virtual void EnableLanguage(std::vector<std::string>const& languages,
  38. cmMakefile *, bool optional);
  39. /**
  40. * Try running cmake and building a file. This is used for dynalically
  41. * loaded commands, not as part of the usual build process.
  42. */
  43. virtual std::string GenerateBuildCommand(const char* makeProgram,
  44. const char *projectName,
  45. const char* additionalOptions,
  46. const char *targetName,
  47. const char* config,
  48. bool ignoreErrors,
  49. bool fast);
  50. /**
  51. * Generate the all required files for building this project/tree. This
  52. * basically creates a series of LocalGenerators for each directory and
  53. * requests that they Generate.
  54. */
  55. virtual void Generate();
  56. /**
  57. * Generate the DSW workspace file.
  58. */
  59. virtual void OutputDSWFile();
  60. virtual void OutputDSWFile(cmLocalGenerator* root,
  61. std::vector<cmLocalGenerator*>& generators);
  62. virtual void WriteDSWFile(std::ostream& fout,
  63. cmLocalGenerator* root,
  64. std::vector<cmLocalGenerator*>& generators);
  65. /** Append the subdirectory for the given configuration. */
  66. virtual void AppendDirectoryForConfig(const char* prefix,
  67. const char* config,
  68. const char* suffix,
  69. std::string& dir);
  70. ///! What is the configurations directory variable called?
  71. virtual const char* GetCMakeCFGInitDirectory() { return "$(IntDir)"; }
  72. protected:
  73. virtual const char* GetIDEVersion() { return "6.0"; }
  74. private:
  75. void GenerateConfigurations(cmMakefile* mf);
  76. void WriteDSWFile(std::ostream& fout);
  77. void WriteDSWHeader(std::ostream& fout);
  78. void WriteProject(std::ostream& fout,
  79. const char* name, const char* path, cmTarget &t);
  80. void WriteExternalProject(std::ostream& fout,
  81. const char* name, const char* path,
  82. const std::set<cmStdString>& dependencies);
  83. void WriteDSWFooter(std::ostream& fout);
  84. virtual std::string WriteUtilityDepend(cmTarget* target);
  85. };
  86. #endif