cmGlobalVisualStudio6Generator.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 std::string GenerateBuildCommand(const char* makeProgram,
  46. const char *projectName,
  47. const char* additionalOptions,
  48. const char *targetName,
  49. const char* config,
  50. bool ignoreErrors);
  51. /**
  52. * Generate the all required files for building this project/tree. This
  53. * basically creates a series of LocalGenerators for each directory and
  54. * requests that they Generate.
  55. */
  56. virtual void Generate();
  57. /**
  58. * Generate the DSW workspace file.
  59. */
  60. virtual void OutputDSWFile();
  61. virtual void OutputDSWFile(cmLocalGenerator* root,
  62. std::vector<cmLocalGenerator*>& generators);
  63. virtual void WriteDSWFile(std::ostream& fout,
  64. cmLocalGenerator* root,
  65. std::vector<cmLocalGenerator*>& generators);
  66. /** Append the subdirectory for the given configuration. */
  67. virtual void AppendDirectoryForConfig(const char* prefix,
  68. const char* config,
  69. const char* suffix,
  70. std::string& dir);
  71. ///! What is the configurations directory variable called?
  72. virtual const char* GetCMakeCFGInitDirectory() { return "$(IntDir)"; }
  73. private:
  74. void GenerateConfigurations(cmMakefile* mf);
  75. void WriteDSWFile(std::ostream& fout);
  76. void WriteDSWHeader(std::ostream& fout);
  77. void WriteProject(std::ostream& fout,
  78. const char* name, const char* path, cmTarget &t);
  79. void WriteExternalProject(std::ostream& fout,
  80. const char* name, const char* path,
  81. const std::vector<std::string>& dependencies);
  82. void WriteDSWFooter(std::ostream& fout);
  83. };
  84. #endif