resolve cyclic dependency with zstd
[platform/upstream/cmake.git] / Source / cmGlobalVisualStudio8Generator.h
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
5 #include <iosfwd>
6 #include <set>
7 #include <string>
8 #include <vector>
9
10 #include <cm/optional>
11
12 #include "cmGlobalVisualStudio71Generator.h"
13
14 class cmGeneratorTarget;
15 class cmMakefile;
16 class cmake;
17 struct cmIDEFlagTable;
18
19 /** \class cmGlobalVisualStudio8Generator
20  * \brief Write a Unix makefiles.
21  *
22  * cmGlobalVisualStudio8Generator manages UNIX build process for a tree
23  */
24 class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
25 {
26 public:
27   //! Get the name for the generator.
28   std::string GetName() const override { return this->Name; }
29
30   /** Get the name of the main stamp list file. */
31   static std::string GetGenerateStampList();
32
33   void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
34                       bool optional) override;
35   virtual void AddPlatformDefinitions(cmMakefile* mf);
36
37   bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override;
38
39   cm::optional<std::string> const& GetTargetFrameworkVersion() const;
40   cm::optional<std::string> const& GetTargetFrameworkIdentifier() const;
41   cm::optional<std::string> const& GetTargetFrameworkTargetsVersion() const;
42
43   /**
44    * Override Configure and Generate to add the build-system check
45    * target.
46    */
47   void Configure() override;
48
49   /** Return true if the target project file should have the option
50       LinkLibraryDependencies and link to .sln dependencies. */
51   bool NeedLinkLibraryDependencies(cmGeneratorTarget* target) override;
52
53   /** Return true if building for Windows CE */
54   bool TargetsWindowsCE() const override
55   {
56     return !this->WindowsCEVersion.empty();
57   }
58
59 protected:
60   cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name,
61                                  std::string const& platformInGeneratorName);
62
63   void AddExtraIDETargets() override;
64
65   std::string FindDevEnvCommand() override;
66
67   bool VSLinksDependencies() const override { return false; }
68
69   bool AddCheckTarget();
70
71   /** Return true if the configuration needs to be deployed */
72   virtual bool NeedsDeploy(cmGeneratorTarget const& target,
73                            const char* config) const;
74
75   /** Returns true if the target system support debugging deployment. */
76   virtual bool TargetSystemSupportsDeployment() const;
77
78   static cmIDEFlagTable const* GetExtraFlagTableVS8();
79   void WriteSolutionConfigurations(
80     std::ostream& fout, std::vector<std::string> const& configs) override;
81   void WriteProjectConfigurations(
82     std::ostream& fout, const std::string& name,
83     cmGeneratorTarget const& target, std::vector<std::string> const& configs,
84     const std::set<std::string>& configsPartOfDefaultBuild,
85     const std::string& platformMapping = "") override;
86   bool ComputeTargetDepends() override;
87   void WriteProjectDepends(std::ostream& fout, const std::string& name,
88                            const std::string& path,
89                            const cmGeneratorTarget* t) override;
90
91   bool UseFolderProperty() const override;
92
93   std::string Name;
94   std::string WindowsCEVersion;
95
96   cm::optional<std::string> DefaultTargetFrameworkVersion;
97   cm::optional<std::string> DefaultTargetFrameworkIdentifier;
98   cm::optional<std::string> DefaultTargetFrameworkTargetsVersion;
99 };