cmGlobalVisualStudio8Generator.h 3.3 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. std::string GetName() const override { return this->Name; }
  19. /** Get the name of the main stamp list file. */
  20. static std::string GetGenerateStampList();
  21. void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
  22. bool optional) override;
  23. virtual void AddPlatformDefinitions(cmMakefile* mf);
  24. bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override;
  25. /**
  26. * Override Configure and Generate to add the build-system check
  27. * target.
  28. */
  29. void Configure() override;
  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. std::string GetUserMacrosDirectory() override;
  36. /**
  37. * What is the reg key path to "vsmacros" for this version of Visual
  38. * Studio?
  39. */
  40. std::string GetUserMacrosRegKeyBase() override;
  41. /** Return true if the target project file should have the option
  42. LinkLibraryDependencies and link to .sln dependencies. */
  43. bool NeedLinkLibraryDependencies(cmGeneratorTarget* target) override;
  44. /** Return true if building for Windows CE */
  45. bool TargetsWindowsCE() const override
  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. void AddExtraIDETargets() override;
  53. const char* GetIDEVersion() override { return "8.0"; }
  54. std::string FindDevEnvCommand() override;
  55. bool VSLinksDependencies() const override { 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. void WriteSLNHeader(std::ostream& fout) override;
  61. void WriteSolutionConfigurations(
  62. std::ostream& fout, std::vector<std::string> const& configs) override;
  63. void WriteProjectConfigurations(
  64. std::ostream& fout, const std::string& name,
  65. cmGeneratorTarget const& target, std::vector<std::string> const& configs,
  66. const std::set<std::string>& configsPartOfDefaultBuild,
  67. const std::string& platformMapping = "") override;
  68. bool ComputeTargetDepends() override;
  69. void WriteProjectDepends(std::ostream& fout, const std::string& name,
  70. const char* path,
  71. const cmGeneratorTarget* t) override;
  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