1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
10 #include <cm/optional>
12 #include "cmGlobalVisualStudio71Generator.h"
14 class cmGeneratorTarget;
17 struct cmIDEFlagTable;
19 /** \class cmGlobalVisualStudio8Generator
20 * \brief Write a Unix makefiles.
22 * cmGlobalVisualStudio8Generator manages UNIX build process for a tree
24 class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
27 //! Get the name for the generator.
28 std::string GetName() const override { return this->Name; }
30 /** Get the name of the main stamp list file. */
31 static std::string GetGenerateStampList();
33 void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
34 bool optional) override;
35 virtual void AddPlatformDefinitions(cmMakefile* mf);
37 bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override;
39 cm::optional<std::string> const& GetTargetFrameworkVersion() const;
40 cm::optional<std::string> const& GetTargetFrameworkIdentifier() const;
41 cm::optional<std::string> const& GetTargetFrameworkTargetsVersion() const;
44 * Override Configure and Generate to add the build-system check
47 void Configure() override;
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;
53 /** Return true if building for Windows CE */
54 bool TargetsWindowsCE() const override
56 return !this->WindowsCEVersion.empty();
60 cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name,
61 std::string const& platformInGeneratorName);
63 void AddExtraIDETargets() override;
65 std::string FindDevEnvCommand() override;
67 bool VSLinksDependencies() const override { return false; }
69 bool AddCheckTarget();
71 /** Return true if the configuration needs to be deployed */
72 virtual bool NeedsDeploy(cmGeneratorTarget const& target,
73 const char* config) const;
75 /** Returns true if the target system support debugging deployment. */
76 virtual bool TargetSystemSupportsDeployment() const;
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;
91 bool UseFolderProperty() const override;
94 std::string WindowsCEVersion;
96 cm::optional<std::string> DefaultTargetFrameworkVersion;
97 cm::optional<std::string> DefaultTargetFrameworkIdentifier;
98 cm::optional<std::string> DefaultTargetFrameworkTargetsVersion;