cmGlobalVisualStudio8Generator.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 <cm/optional>
  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. //! Get the name for the generator.
  15. std::string GetName() const override { return this->Name; }
  16. /** Get the name of the main stamp list file. */
  17. static std::string GetGenerateStampList();
  18. void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
  19. bool optional) override;
  20. virtual void AddPlatformDefinitions(cmMakefile* mf);
  21. bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override;
  22. cm::optional<std::string> const& GetTargetFrameworkVersion() const;
  23. cm::optional<std::string> const& GetTargetFrameworkIdentifier() const;
  24. cm::optional<std::string> const& GetTargetFrameworkTargetsVersion() const;
  25. /**
  26. * Override Configure and Generate to add the build-system check
  27. * target.
  28. */
  29. void Configure() override;
  30. /** Return true if the target project file should have the option
  31. LinkLibraryDependencies and link to .sln dependencies. */
  32. bool NeedLinkLibraryDependencies(cmGeneratorTarget* target) override;
  33. /** Return true if building for Windows CE */
  34. bool TargetsWindowsCE() const override
  35. {
  36. return !this->WindowsCEVersion.empty();
  37. }
  38. protected:
  39. cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name,
  40. std::string const& platformInGeneratorName);
  41. void AddExtraIDETargets() override;
  42. std::string FindDevEnvCommand() override;
  43. bool VSLinksDependencies() const override { return false; }
  44. bool AddCheckTarget();
  45. /** Return true if the configuration needs to be deployed */
  46. virtual bool NeedsDeploy(cmGeneratorTarget const& target,
  47. const char* config) const;
  48. /** Returns true if the target system support debugging deployment. */
  49. virtual bool TargetSystemSupportsDeployment() const;
  50. static cmIDEFlagTable const* GetExtraFlagTableVS8();
  51. void WriteSolutionConfigurations(
  52. std::ostream& fout, std::vector<std::string> const& configs) override;
  53. void WriteProjectConfigurations(
  54. std::ostream& fout, const std::string& name,
  55. cmGeneratorTarget const& target, std::vector<std::string> const& configs,
  56. const std::set<std::string>& configsPartOfDefaultBuild,
  57. const std::string& platformMapping = "") override;
  58. bool ComputeTargetDepends() override;
  59. void WriteProjectDepends(std::ostream& fout, const std::string& name,
  60. const std::string& path,
  61. const cmGeneratorTarget* t) override;
  62. bool UseFolderProperty() const override;
  63. std::string Name;
  64. std::string WindowsCEVersion;
  65. cm::optional<std::string> DefaultTargetFrameworkVersion;
  66. cm::optional<std::string> DefaultTargetFrameworkIdentifier;
  67. cm::optional<std::string> DefaultTargetFrameworkTargetsVersion;
  68. };