cmGlobalVisualStudio8Generator.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file LICENSE.rst 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 "cmGlobalVisualStudio7Generator.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 cmGlobalVisualStudio7Generator
  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, std::string const& 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. bool NeedsDeploy(cmGeneratorTarget const& target,
  50. char const* config) const override;
  51. bool TargetSystemSupportsDeployment() const override;
  52. static cmIDEFlagTable const* GetExtraFlagTableVS8();
  53. std::string Name;
  54. std::string WindowsCEVersion;
  55. cm::optional<std::string> DefaultTargetFrameworkVersion;
  56. cm::optional<std::string> DefaultTargetFrameworkIdentifier;
  57. cm::optional<std::string> DefaultTargetFrameworkTargetsVersion;
  58. private:
  59. bool ParseGeneratorPlatform(std::string const& is, cmMakefile* mf);
  60. };