cmGlobalVisualStudio7Generator.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 std::string GenerateBuildCommand(const char* makeProgram,
  45. const char *projectName, const char *targetName, const char* config,
  46. bool ignoreErrors);
  47. /**
  48. * Generate the all required files for building this project/tree. This
  49. * basically creates a series of LocalGenerators for each directory and
  50. * requests that they Generate.
  51. */
  52. virtual void Generate();
  53. /**
  54. * Generate the DSW workspace file.
  55. */
  56. virtual void OutputSLNFile();
  57. /**
  58. * Get the list of configurations
  59. */
  60. std::vector<std::string> *GetConfigurations();
  61. ///! Create a GUID
  62. void CreateGUID(const char* name);
  63. ///! do configure step
  64. virtual void Configure();
  65. protected:
  66. std::string GetGUID(const char* name);
  67. virtual void OutputSLNFile(cmLocalGenerator* root,
  68. std::vector<cmLocalGenerator*>& generators);
  69. virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root,
  70. std::vector<cmLocalGenerator*>& generators);
  71. virtual void WriteProject(std::ostream& fout,
  72. const char* name, const char* path,
  73. const cmTarget &t);
  74. virtual void WriteProjectDepends(std::ostream& fout,
  75. const char* name, const char* path,
  76. const cmTarget &t);
  77. virtual void WriteProjectConfigurations(std::ostream& fout, const char* name, bool in_all);
  78. virtual void WriteSLNFooter(std::ostream& fout);
  79. virtual void WriteSLNHeader(std::ostream& fout);
  80. void GenerateConfigurations(cmMakefile* mf);
  81. void WriteExternalProject(std::ostream& fout,
  82. const char* name, const char* path,
  83. const std::vector<std::string>& dependencies);
  84. std::vector<std::string> m_Configurations;
  85. std::map<cmStdString, cmStdString> m_GUIDMap;
  86. };
  87. #endif