cmGlobalVisualStudio8Generator.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include <iosfwd>
  5. #include <set>
  6. #include <string>
  7. #include <vector>
  8. #include <cm/optional>
  9. #include "cmGlobalVisualStudio71Generator.h"
  10. class cmGeneratorTarget;
  11. class cmMakefile;
  12. class cmake;
  13. struct cmIDEFlagTable;
  14. /** \class cmGlobalVisualStudio8Generator
  15. * \brief Write a Unix makefiles.
  16. *
  17. * cmGlobalVisualStudio8Generator manages UNIX build process for a tree
  18. */
  19. class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
  20. {
  21. public:
  22. //! Get the name for the generator.
  23. std::string GetName() const override { return this->Name; }
  24. /** Get the name of the main stamp list file. */
  25. static std::string GetGenerateStampList();
  26. void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
  27. bool optional) override;
  28. virtual void AddPlatformDefinitions(cmMakefile* mf);
  29. bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override;
  30. cm::optional<std::string> const& GetTargetFrameworkVersion() const;
  31. cm::optional<std::string> const& GetTargetFrameworkIdentifier() const;
  32. cm::optional<std::string> const& GetTargetFrameworkTargetsVersion() const;
  33. /** Return true if the target project file should have the option
  34. LinkLibraryDependencies and link to .sln dependencies. */
  35. bool NeedLinkLibraryDependencies(cmGeneratorTarget* target) override;
  36. /** Return true if building for Windows CE */
  37. bool TargetsWindowsCE() const override
  38. {
  39. return !this->WindowsCEVersion.empty();
  40. }
  41. protected:
  42. cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name);
  43. virtual bool ProcessGeneratorPlatformField(std::string const& key,
  44. std::string const& value);
  45. void AddExtraIDETargets() override;
  46. std::string FindDevEnvCommand() override;
  47. bool VSLinksDependencies() const override { return false; }
  48. bool AddCheckTarget();
  49. /** Return true if the configuration needs to be deployed */
  50. virtual bool NeedsDeploy(cmGeneratorTarget const& target,
  51. const char* config) const;
  52. /** Returns true if the target system support debugging deployment. */
  53. virtual bool TargetSystemSupportsDeployment() const;
  54. static cmIDEFlagTable const* GetExtraFlagTableVS8();
  55. void WriteSolutionConfigurations(
  56. std::ostream& fout, std::vector<std::string> const& configs) override;
  57. void WriteProjectConfigurations(
  58. std::ostream& fout, const std::string& name,
  59. cmGeneratorTarget const& target, std::vector<std::string> const& configs,
  60. const std::set<std::string>& configsPartOfDefaultBuild,
  61. const std::string& platformMapping = "") override;
  62. bool ComputeTargetDepends() override;
  63. void WriteProjectDepends(std::ostream& fout, const std::string& name,
  64. const std::string& path,
  65. const cmGeneratorTarget* t) override;
  66. bool UseFolderProperty() const override;
  67. std::string Name;
  68. std::string WindowsCEVersion;
  69. cm::optional<std::string> DefaultTargetFrameworkVersion;
  70. cm::optional<std::string> DefaultTargetFrameworkIdentifier;
  71. cm::optional<std::string> DefaultTargetFrameworkTargetsVersion;
  72. private:
  73. bool ParseGeneratorPlatform(std::string const& is, cmMakefile* mf);
  74. };