cmGlobalVisualStudio8Generator.h 3.4 KB

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