cmGlobalVisualStudio8Generator.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmGlobalVisualStudio8Generator_h
  11. #define cmGlobalVisualStudio8Generator_h
  12. #include "cmGlobalVisualStudio71Generator.h"
  13. /** \class cmGlobalVisualStudio8Generator
  14. * \brief Write a Unix makefiles.
  15. *
  16. * cmGlobalVisualStudio8Generator manages UNIX build process for a tree
  17. */
  18. class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
  19. {
  20. public:
  21. cmGlobalVisualStudio8Generator(const char* name,
  22. const char* architectureId, const char* additionalPlatformDefinition);
  23. static cmGlobalGeneratorFactory* NewFactory();
  24. ///! Get the name for the generator.
  25. virtual const char* GetName() const {return this->Name.c_str();}
  26. /** Get the documentation entry for this generator. */
  27. static void GetDocumentation(cmDocumentationEntry& entry);
  28. ///! Create a local generator appropriate to this Global Generator
  29. virtual cmLocalGenerator *CreateLocalGenerator();
  30. virtual void AddPlatformDefinitions(cmMakefile* mf);
  31. /**
  32. * Override Configure and Generate to add the build-system check
  33. * target.
  34. */
  35. virtual void Configure();
  36. virtual void Generate();
  37. /**
  38. * Where does this version of Visual Studio look for macros for the
  39. * current user? Returns the empty string if this version of Visual
  40. * Studio does not implement support for VB macros.
  41. */
  42. virtual std::string GetUserMacrosDirectory();
  43. /**
  44. * What is the reg key path to "vsmacros" for this version of Visual
  45. * Studio?
  46. */
  47. virtual std::string GetUserMacrosRegKeyBase();
  48. /** Return true if the target project file should have the option
  49. LinkLibraryDependencies and link to .sln dependencies. */
  50. virtual bool NeedLinkLibraryDependencies(cmTarget& target);
  51. /** Return true if building for Windows CE */
  52. virtual bool TargetsWindowsCE() const {
  53. return !this->WindowsCEVersion.empty(); }
  54. protected:
  55. virtual const char* GetIDEVersion() { return "8.0"; }
  56. virtual bool VSLinksDependencies() const { return false; }
  57. void AddCheckTarget();
  58. static cmIDEFlagTable const* GetExtraFlagTableVS8();
  59. virtual void WriteSLNHeader(std::ostream& fout);
  60. virtual void WriteSolutionConfigurations(std::ostream& fout);
  61. virtual void WriteProjectConfigurations(
  62. std::ostream& fout, const char* name, cmTarget::TargetType type,
  63. const std::set<std::string>& configsPartOfDefaultBuild,
  64. const char* platformMapping = NULL);
  65. virtual bool ComputeTargetDepends();
  66. virtual void WriteProjectDepends(std::ostream& fout, const char* name,
  67. const char* path, cmTarget &t);
  68. std::string Name;
  69. std::string WindowsCEVersion;
  70. private:
  71. class Factory;
  72. friend class Factory;
  73. };
  74. #endif