cmGlobalVisualStudio6Generator.h 3.5 KB

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