cmGlobalVisualStudio8Generator.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 std::string& name,
  22. const std::string& platformName);
  23. static cmGlobalGeneratorFactory* NewFactory();
  24. ///! Get the name for the generator.
  25. virtual std::string GetName() const {return this->Name;}
  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 EnableLanguage(std::vector<std::string>const& languages,
  31. cmMakefile *, bool optional);
  32. virtual void AddPlatformDefinitions(cmMakefile* mf);
  33. virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf);
  34. /**
  35. * Override Configure and Generate to add the build-system check
  36. * target.
  37. */
  38. virtual void Configure();
  39. /**
  40. * Where does this version of Visual Studio look for macros for the
  41. * current user? Returns the empty string if this version of Visual
  42. * Studio does not implement support for VB macros.
  43. */
  44. virtual std::string GetUserMacrosDirectory();
  45. /**
  46. * What is the reg key path to "vsmacros" for this version of Visual
  47. * Studio?
  48. */
  49. virtual std::string GetUserMacrosRegKeyBase();
  50. /** Return true if the target project file should have the option
  51. LinkLibraryDependencies and link to .sln dependencies. */
  52. virtual bool NeedLinkLibraryDependencies(cmTarget& target);
  53. /** Return true if building for Windows CE */
  54. virtual bool TargetsWindowsCE() const {
  55. return !this->WindowsCEVersion.empty(); }
  56. protected:
  57. virtual void Generate();
  58. virtual const char* GetIDEVersion() { return "8.0"; }
  59. virtual std::string FindDevEnvCommand();
  60. virtual bool VSLinksDependencies() const { return false; }
  61. bool AddCheckTarget();
  62. /** Return true if the configuration needs to be deployed */
  63. virtual bool NeedsDeploy(cmTarget::TargetType type) const;
  64. static cmIDEFlagTable const* GetExtraFlagTableVS8();
  65. virtual void WriteSLNHeader(std::ostream& fout);
  66. virtual void WriteSolutionConfigurations(std::ostream& fout);
  67. virtual void WriteProjectConfigurations(
  68. std::ostream& fout, const std::string& name, cmTarget::TargetType type,
  69. const std::set<std::string>& configsPartOfDefaultBuild,
  70. const std::string& platformMapping = "");
  71. virtual bool ComputeTargetDepends();
  72. virtual void WriteProjectDepends(std::ostream& fout,
  73. const std::string& name,
  74. const char* path, cmTarget const& t);
  75. std::string Name;
  76. std::string WindowsCEVersion;
  77. private:
  78. class Factory;
  79. friend class Factory;
  80. };
  81. #endif