cmGlobalVisualStudio8Generator.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmGlobalVisualStudio8Generator_h
  4. #define cmGlobalVisualStudio8Generator_h
  5. #include "cmGlobalVisualStudio71Generator.h"
  6. /** \class cmGlobalVisualStudio8Generator
  7. * \brief Write a Unix makefiles.
  8. *
  9. * cmGlobalVisualStudio8Generator manages UNIX build process for a tree
  10. */
  11. class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
  12. {
  13. public:
  14. cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name,
  15. const std::string& platformName);
  16. static cmGlobalGeneratorFactory* NewFactory();
  17. ///! Get the name for the generator.
  18. virtual std::string GetName() const { return this->Name; }
  19. /** Get the documentation entry for this generator. */
  20. static void GetDocumentation(cmDocumentationEntry& entry);
  21. virtual void EnableLanguage(std::vector<std::string> const& languages,
  22. cmMakefile*, bool optional);
  23. virtual void AddPlatformDefinitions(cmMakefile* mf);
  24. virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf);
  25. /**
  26. * Override Configure and Generate to add the build-system check
  27. * target.
  28. */
  29. virtual void Configure();
  30. /**
  31. * Where does this version of Visual Studio look for macros for the
  32. * current user? Returns the empty string if this version of Visual
  33. * Studio does not implement support for VB macros.
  34. */
  35. virtual std::string GetUserMacrosDirectory();
  36. /**
  37. * What is the reg key path to "vsmacros" for this version of Visual
  38. * Studio?
  39. */
  40. virtual std::string GetUserMacrosRegKeyBase();
  41. /** Return true if the target project file should have the option
  42. LinkLibraryDependencies and link to .sln dependencies. */
  43. virtual bool NeedLinkLibraryDependencies(cmGeneratorTarget* target);
  44. /** Return true if building for Windows CE */
  45. virtual bool TargetsWindowsCE() const
  46. {
  47. return !this->WindowsCEVersion.empty();
  48. }
  49. /** Is the installed VS an Express edition? */
  50. bool IsExpressEdition() const { return this->ExpressEdition; }
  51. protected:
  52. virtual void AddExtraIDETargets();
  53. virtual const char* GetIDEVersion() { return "8.0"; }
  54. virtual std::string FindDevEnvCommand();
  55. virtual bool VSLinksDependencies() const { return false; }
  56. bool AddCheckTarget();
  57. /** Return true if the configuration needs to be deployed */
  58. virtual bool NeedsDeploy(cmStateEnums::TargetType type) const;
  59. static cmIDEFlagTable const* GetExtraFlagTableVS8();
  60. virtual void WriteSLNHeader(std::ostream& fout);
  61. virtual void WriteSolutionConfigurations(
  62. std::ostream& fout, std::vector<std::string> const& configs);
  63. virtual void WriteProjectConfigurations(
  64. std::ostream& fout, const std::string& name, cmStateEnums::TargetType type,
  65. std::vector<std::string> const& configs,
  66. const std::set<std::string>& configsPartOfDefaultBuild,
  67. const std::string& platformMapping = "");
  68. virtual bool ComputeTargetDepends();
  69. virtual void WriteProjectDepends(std::ostream& fout, const std::string& name,
  70. const char* path,
  71. const cmGeneratorTarget* t);
  72. bool UseFolderProperty();
  73. std::string Name;
  74. std::string WindowsCEVersion;
  75. bool ExpressEdition;
  76. private:
  77. class Factory;
  78. friend class Factory;
  79. };
  80. #endif