cmGlobalVisualStudio6Generator.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 cmGlobalVisualStudio6Generator_h
  14. #define cmGlobalVisualStudio6Generator_h
  15. #include "cmGlobalGenerator.h"
  16. class cmTarget;
  17. /** \class cmGlobalVisualStudio6Generator
  18. * \brief Write a Unix makefiles.
  19. *
  20. * cmGlobalVisualStudio6Generator manages UNIX build process for a tree
  21. */
  22. class cmGlobalVisualStudio6Generator : public cmGlobalGenerator
  23. {
  24. public:
  25. cmGlobalVisualStudio6Generator();
  26. static cmGlobalGenerator* New() { return new cmGlobalVisualStudio6Generator; }
  27. ///! Get the name for the generator.
  28. virtual const char* GetName() const {
  29. return cmGlobalVisualStudio6Generator::GetActualName();}
  30. static const char* GetActualName() {return "Visual Studio 6";}
  31. /** Get the documentation entry for this generator. */
  32. virtual void GetDocumentation(cmDocumentationEntry& entry) const;
  33. ///! Create a local generator appropriate to this Global Generator
  34. virtual cmLocalGenerator *CreateLocalGenerator();
  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,
  40. cmMakefile *);
  41. /**
  42. * Try running cmake and building a file. This is used for dynalically
  43. * loaded commands, not as part of the usual build process.
  44. */
  45. virtual int Build(const char *srcdir, const char *bindir,
  46. const char *projectName, const char *targetName,
  47. std::string *output,
  48. const char *makeProgram,
  49. const char *config, bool clean);
  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. private:
  66. void GenerateConfigurations(cmMakefile* mf);
  67. void WriteDSWFile(std::ostream& fout);
  68. void WriteDSWHeader(std::ostream& fout);
  69. void WriteProject(std::ostream& fout,
  70. const char* name, const char* path,
  71. const cmTarget &t);
  72. void WriteExternalProject(std::ostream& fout,
  73. const char* name, const char* path,
  74. const std::vector<std::string>& dependencies);
  75. void WriteDSWFooter(std::ostream& fout);
  76. };
  77. #endif