cmGlobalVisualStudio6Generator.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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 "cmGlobalVisualStudioGenerator.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 cmGlobalVisualStudioGenerator
  23. {
  24. public:
  25. cmGlobalVisualStudio6Generator();
  26. static cmGlobalGenerator* New() {
  27. return new cmGlobalVisualStudio6Generator; }
  28. ///! Get the name for the generator.
  29. virtual const char* GetName() const {
  30. return cmGlobalVisualStudio6Generator::GetActualName();}
  31. static const char* GetActualName() {return "Visual Studio 6";}
  32. /** Get the documentation entry for this generator. */
  33. virtual void GetDocumentation(cmDocumentationEntry& entry) const;
  34. ///! Create a local generator appropriate to this Global Generator
  35. virtual cmLocalGenerator *CreateLocalGenerator();
  36. /**
  37. * Try to determine system infomation such as shared library
  38. * extension, pthreads, byte order etc.
  39. */
  40. virtual void EnableLanguage(std::vector<std::string>const& languages,
  41. cmMakefile *, bool optional);
  42. /**
  43. * Try running cmake and building a file. This is used for dynalically
  44. * loaded commands, not as part of the usual build process.
  45. */
  46. virtual std::string GenerateBuildCommand(const char* makeProgram,
  47. const char *projectName,
  48. const char* additionalOptions,
  49. const char *targetName,
  50. const char* config,
  51. bool ignoreErrors,
  52. bool fast);
  53. /**
  54. * Generate the all required files for building this project/tree. This
  55. * basically creates a series of LocalGenerators for each directory and
  56. * requests that they Generate.
  57. */
  58. virtual void Generate();
  59. /**
  60. * Generate the DSW workspace file.
  61. */
  62. virtual void OutputDSWFile();
  63. virtual void OutputDSWFile(cmLocalGenerator* root,
  64. std::vector<cmLocalGenerator*>& generators);
  65. virtual void WriteDSWFile(std::ostream& fout,
  66. cmLocalGenerator* root,
  67. std::vector<cmLocalGenerator*>& generators);
  68. /** Append the subdirectory for the given configuration. */
  69. virtual void AppendDirectoryForConfig(const char* prefix,
  70. const char* config,
  71. const char* suffix,
  72. std::string& dir);
  73. ///! What is the configurations directory variable called?
  74. virtual const char* GetCMakeCFGInitDirectory() { return "$(IntDir)"; }
  75. protected:
  76. virtual const char* GetIDEVersion() { return "6.0"; }
  77. private:
  78. void GenerateConfigurations(cmMakefile* mf);
  79. void WriteDSWFile(std::ostream& fout);
  80. void WriteDSWHeader(std::ostream& fout);
  81. void WriteProject(std::ostream& fout,
  82. const char* name, const char* path, cmTarget &t);
  83. void WriteExternalProject(std::ostream& fout,
  84. const char* name, const char* path,
  85. const std::set<cmStdString>& dependencies);
  86. void WriteDSWFooter(std::ostream& fout);
  87. };
  88. #endif