cmGlobalVisualStudio7Generator.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmGlobalVisualStudio7Generator_h
  14. #define cmGlobalVisualStudio7Generator_h
  15. #include "cmGlobalGenerator.h"
  16. class cmTarget;
  17. /** \class cmGlobalVisualStudio7Generator
  18. * \brief Write a Unix makefiles.
  19. *
  20. * cmGlobalVisualStudio7Generator manages UNIX build process for a tree
  21. */
  22. class cmGlobalVisualStudio7Generator : public cmGlobalGenerator
  23. {
  24. public:
  25. cmGlobalVisualStudio7Generator();
  26. static cmGlobalGenerator* New() { return new cmGlobalVisualStudio7Generator; }
  27. ///! Get the name for the generator.
  28. virtual const char* GetName() const {
  29. return cmGlobalVisualStudio7Generator::GetActualName();}
  30. static const char* GetActualName() {return "Visual Studio 7";}
  31. ///! Create a local generator appropriate to this Global Generator
  32. virtual cmLocalGenerator *CreateLocalGenerator();
  33. /** Get the documentation entry for this generator. */
  34. virtual void GetDocumentation(cmDocumentationEntry& entry) const;
  35. /**
  36. * Try to determine system infomation such as shared library
  37. * extension, pthreads, byte order etc.
  38. */
  39. virtual void EnableLanguage(std::vector<std::string>const& languages, cmMakefile *);
  40. /**
  41. * Try running cmake and building a file. This is used for dynalically
  42. * loaded commands, not as part of the usual build process.
  43. */
  44. virtual int Build(const char *srcdir, const char *bindir,
  45. const char *projectName, const char *targetName,
  46. std::string *output,
  47. const char *makeProgram,
  48. const char *config, bool clean);
  49. /**
  50. * Generate the all required files for building this project/tree. This
  51. * basically creates a series of LocalGenerators for each directory and
  52. * requests that they Generate.
  53. */
  54. virtual void Generate();
  55. /**
  56. * Generate the DSW workspace file.
  57. */
  58. virtual void OutputSLNFile();
  59. /**
  60. * Get the list of configurations
  61. */
  62. std::vector<std::string> *GetConfigurations();
  63. ///! Create a GUID
  64. void CreateGUID(const char* name);
  65. ///! do configure step
  66. virtual void Configure();
  67. protected:
  68. std::string GetGUID(const char* name);
  69. virtual void OutputSLNFile(cmLocalGenerator* root,
  70. std::vector<cmLocalGenerator*>& generators);
  71. virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root,
  72. std::vector<cmLocalGenerator*>& generators);
  73. virtual void WriteProject(std::ostream& fout,
  74. const char* name, const char* path,
  75. const cmTarget &t);
  76. virtual void WriteProjectDepends(std::ostream& fout,
  77. const char* name, const char* path,
  78. const cmTarget &t);
  79. virtual void WriteProjectConfigurations(std::ostream& fout, const char* name, bool in_all);
  80. virtual void WriteSLNFooter(std::ostream& fout);
  81. virtual void WriteSLNHeader(std::ostream& fout);
  82. void GenerateConfigurations(cmMakefile* mf);
  83. void WriteExternalProject(std::ostream& fout,
  84. const char* name, const char* path,
  85. const std::vector<std::string>& dependencies);
  86. std::vector<std::string> m_Configurations;
  87. std::map<cmStdString, cmStdString> m_GUIDMap;
  88. };
  89. #endif