Brad King | 86578ec | 2016-09-27 15:01:08 -0400 | [diff] [blame] | 1 | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
| 2 | file Copyright.txt or https://cmake.org/licensing for details. */ |
Kitware Robot | bdca8b0 | 2020-08-29 16:27:37 -0400 | [diff] [blame] | 3 | #pragma once |
Bill Hoffman | 7491f52 | 2009-06-25 16:41:57 -0400 | [diff] [blame] | 4 | |
NAKAMURA Takumi | 0e58a5e | 2021-11-14 19:58:11 +0900 | [diff] [blame] | 5 | #include <cstddef> |
Marc Chevrier | 36c8cae | 2019-12-09 18:13:42 +0100 | [diff] [blame] | 6 | #include <memory> |
Kyle Edwards | 6051a49 | 2020-06-12 15:11:04 -0400 | [diff] [blame] | 7 | #include <set> |
NAKAMURA Takumi | 0e58a5e | 2021-11-14 19:58:11 +0900 | [diff] [blame] | 8 | #include <string> |
| 9 | #include <vector> |
Marc Chevrier | 36c8cae | 2019-12-09 18:13:42 +0100 | [diff] [blame] | 10 | |
Brad King | 1b33150 | 2021-03-04 16:23:52 -0500 | [diff] [blame] | 11 | #include <cm/optional> |
| 12 | #include <cm/string_view> |
| 13 | |
Bill Hoffman | 7491f52 | 2009-06-25 16:41:57 -0400 | [diff] [blame] | 14 | #include "cmGlobalVisualStudio8Generator.h" |
| 15 | |
NAKAMURA Takumi | 0e58a5e | 2021-11-14 19:58:11 +0900 | [diff] [blame] | 16 | class cmGeneratorTarget; |
NAKAMURA Takumi | 0e58a5e | 2021-11-14 19:58:11 +0900 | [diff] [blame] | 17 | class cmLocalGenerator; |
| 18 | class cmMakefile; |
| 19 | class cmSourceFile; |
| 20 | class cmake; |
| 21 | struct cmIDEFlagTable; |
| 22 | |
Bill Hoffman | 7491f52 | 2009-06-25 16:41:57 -0400 | [diff] [blame] | 23 | /** \class cmGlobalVisualStudio10Generator |
| 24 | * \brief Write a Unix makefiles. |
| 25 | * |
| 26 | * cmGlobalVisualStudio10Generator manages UNIX build process for a tree |
| 27 | */ |
Kitware Robot | d9fd2f5 | 2016-05-16 10:34:04 -0400 | [diff] [blame] | 28 | class cmGlobalVisualStudio10Generator : public cmGlobalVisualStudio8Generator |
Bill Hoffman | 7491f52 | 2009-06-25 16:41:57 -0400 | [diff] [blame] | 29 | { |
| 30 | public: |
Brad King | 7f73046 | 2021-10-20 11:59:44 -0400 | [diff] [blame] | 31 | bool IsVisualStudioAtLeast10() const override { return true; } |
| 32 | |
Vitaly Stakhovsky | cfe4e2d | 2017-12-15 21:17:49 -0500 | [diff] [blame] | 33 | bool SetSystemName(std::string const& s, cmMakefile* mf) override; |
Alexander Boczar | 99e83d4 | 2019-09-13 17:32:13 -0700 | [diff] [blame] | 34 | bool SetGeneratorToolset(std::string const& ts, bool build, |
| 35 | cmMakefile* mf) override; |
Brad King | 650c647 | 2012-12-10 10:52:10 -0500 | [diff] [blame] | 36 | |
Bartosz Kosiorek | 324d18b | 2019-02-08 14:28:49 +0100 | [diff] [blame] | 37 | std::vector<GeneratedMakeCommand> GenerateBuildCommand( |
| 38 | const std::string& makeProgram, const std::string& projectName, |
| 39 | const std::string& projectDir, std::vector<std::string> const& targetNames, |
Carsten Rudolph | 193b8fc | 2022-01-21 17:43:17 +0100 | [diff] [blame] | 40 | const std::string& config, int jobs, bool verbose, |
| 41 | const cmBuildOptions& buildOptions = cmBuildOptions(), |
Bartosz Kosiorek | 324d18b | 2019-02-08 14:28:49 +0100 | [diff] [blame] | 42 | std::vector<std::string> const& makeOptions = |
| 43 | std::vector<std::string>()) override; |
Kitware Robot | 7bbaa42 | 2012-08-13 13:42:58 -0400 | [diff] [blame] | 44 | |
Sebastian Holtermann | 735c6f3 | 2019-03-31 11:27:12 +0200 | [diff] [blame] | 45 | //! create the correct local generator |
Marc Chevrier | 36c8cae | 2019-12-09 18:13:42 +0100 | [diff] [blame] | 46 | std::unique_ptr<cmLocalGenerator> CreateLocalGenerator( |
| 47 | cmMakefile* mf) override; |
Bill Hoffman | 7491f52 | 2009-06-25 16:41:57 -0400 | [diff] [blame] | 48 | |
| 49 | /** |
Geoff Viola | bef23e8 | 2014-10-09 17:22:45 -0600 | [diff] [blame] | 50 | * Try to determine system information such as shared library |
Kitware Robot | 7bbaa42 | 2012-08-13 13:42:58 -0400 | [diff] [blame] | 51 | * extension, pthreads, byte order etc. |
Bill Hoffman | 7491f52 | 2009-06-25 16:41:57 -0400 | [diff] [blame] | 52 | */ |
Vitaly Stakhovsky | cfe4e2d | 2017-12-15 21:17:49 -0500 | [diff] [blame] | 53 | void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*, |
| 54 | bool optional) override; |
Bill Hoffman | 7491f52 | 2009-06-25 16:41:57 -0400 | [diff] [blame] | 55 | |
Kyle Edwards | 6051a49 | 2020-06-12 15:11:04 -0400 | [diff] [blame] | 56 | void AddAndroidExecutableWarning(const std::string& name) |
| 57 | { |
| 58 | this->AndroidExecutableWarnings.insert(name); |
| 59 | } |
| 60 | |
Brad King | 13433b1 | 2017-03-07 15:44:43 -0500 | [diff] [blame] | 61 | bool IsCudaEnabled() const { return this->CudaEnabled; } |
| 62 | |
Brad King | 2f07146 | 2014-07-18 11:12:11 -0400 | [diff] [blame] | 63 | /** Generating for Nsight Tegra VS plugin? */ |
| 64 | bool IsNsightTegra() const; |
Brad King | 69e198d | 2014-09-26 14:57:30 -0400 | [diff] [blame] | 65 | std::string GetNsightTegraVersion() const; |
Brad King | 2f07146 | 2014-07-18 11:12:11 -0400 | [diff] [blame] | 66 | |
Alexander Boczar | 548e905 | 2019-09-16 14:14:20 -0700 | [diff] [blame] | 67 | /** The vctargets path for the target platform. */ |
| 68 | const char* GetCustomVCTargetsPath() const; |
| 69 | |
Brad King | fb97ba6 | 2010-12-01 12:48:32 -0500 | [diff] [blame] | 70 | /** The toolset name for the target platform. */ |
Brad King | 98afb45 | 2014-06-04 13:09:35 -0400 | [diff] [blame] | 71 | const char* GetPlatformToolset() const; |
Brad King | 584ab52 | 2016-10-18 10:09:57 -0400 | [diff] [blame] | 72 | std::string const& GetPlatformToolsetString() const; |
Brad King | fb97ba6 | 2010-12-01 12:48:32 -0500 | [diff] [blame] | 73 | |
Brad King | 58a50a3 | 2021-03-11 16:59:20 -0500 | [diff] [blame] | 74 | /** The toolset version props file, if any. */ |
| 75 | std::string const& GetPlatformToolsetVersionProps() const; |
Basil Fierz | 5f13168 | 2018-05-19 13:23:21 +0200 | [diff] [blame] | 76 | |
Brad King | d079e71 | 2016-10-07 15:57:04 -0400 | [diff] [blame] | 77 | /** The toolset host architecture name (e.g. x64 for 64-bit host tools). */ |
| 78 | const char* GetPlatformToolsetHostArchitecture() const; |
Brad King | 0fd742a | 2019-01-28 10:49:16 -0500 | [diff] [blame] | 79 | std::string const& GetPlatformToolsetHostArchitectureString() const; |
Brad King | d079e71 | 2016-10-07 15:57:04 -0400 | [diff] [blame] | 80 | |
Brad King | 5164e9a | 2017-02-08 16:05:08 -0500 | [diff] [blame] | 81 | /** The cuda toolset version. */ |
| 82 | const char* GetPlatformToolsetCuda() const; |
| 83 | std::string const& GetPlatformToolsetCudaString() const; |
| 84 | |
Benjamin Wozniak | df0247a | 2019-08-21 15:27:42 +0200 | [diff] [blame] | 85 | /** The custom cuda install directory */ |
| 86 | const char* GetPlatformToolsetCudaCustomDir() const; |
| 87 | std::string const& GetPlatformToolsetCudaCustomDirString() const; |
| 88 | |
Marcel Ritzschke | c73b847 | 2021-03-14 18:14:19 +0100 | [diff] [blame] | 89 | /** The nvcc subdirectory of a custom cuda install directory */ |
| 90 | std::string const& GetPlatformToolsetCudaNvccSubdirString() const; |
| 91 | |
| 92 | /** The visual studio integration subdirectory of a custom cuda install |
| 93 | * directory */ |
| 94 | std::string const& GetPlatformToolsetCudaVSIntegrationSubdirString() const; |
| 95 | |
Brad King | ae44496 | 2017-06-27 15:58:39 -0400 | [diff] [blame] | 96 | /** Return whether we need to use No/Debug instead of false/true |
| 97 | for GenerateDebugInformation. */ |
| 98 | bool GetPlatformToolsetNeedsDebugEnum() const |
| 99 | { |
| 100 | return this->PlatformToolsetNeedsDebugEnum; |
| 101 | } |
| 102 | |
Brad King | 0a5fe27 | 2014-07-30 14:06:07 -0400 | [diff] [blame] | 103 | /** Return the CMAKE_SYSTEM_NAME. */ |
| 104 | std::string const& GetSystemName() const { return this->SystemName; } |
| 105 | |
| 106 | /** Return the CMAKE_SYSTEM_VERSION. */ |
| 107 | std::string const& GetSystemVersion() const { return this->SystemVersion; } |
| 108 | |
Gilles Khouzam | 3f07799 | 2015-09-30 13:22:43 -0700 | [diff] [blame] | 109 | /** Return the Windows version targeted on VS 2015 and above. */ |
| 110 | std::string const& GetWindowsTargetPlatformVersion() const |
Kitware Robot | d9fd2f5 | 2016-05-16 10:34:04 -0400 | [diff] [blame] | 111 | { |
| 112 | return this->WindowsTargetPlatformVersion; |
| 113 | } |
Gilles Khouzam | 3f07799 | 2015-09-30 13:22:43 -0700 | [diff] [blame] | 114 | |
Pascal Bach | a3298f7 | 2014-09-15 15:46:43 +0200 | [diff] [blame] | 115 | /** Return true if building for WindowsCE */ |
Vitaly Stakhovsky | 9463208 | 2018-12-30 12:32:55 -0500 | [diff] [blame] | 116 | bool TargetsWindowsCE() const override { return this->SystemIsWindowsCE; } |
Pascal Bach | a3298f7 | 2014-09-15 15:46:43 +0200 | [diff] [blame] | 117 | |
Brad King | 3abd150 | 2014-07-29 11:42:30 -0400 | [diff] [blame] | 118 | /** Return true if building for WindowsPhone */ |
Kitware Robot | d9fd2f5 | 2016-05-16 10:34:04 -0400 | [diff] [blame] | 119 | bool TargetsWindowsPhone() const { return this->SystemIsWindowsPhone; } |
Brad King | 3abd150 | 2014-07-29 11:42:30 -0400 | [diff] [blame] | 120 | |
| 121 | /** Return true if building for WindowsStore */ |
Kitware Robot | d9fd2f5 | 2016-05-16 10:34:04 -0400 | [diff] [blame] | 122 | bool TargetsWindowsStore() const { return this->SystemIsWindowsStore; } |
Brad King | 3abd150 | 2014-07-29 11:42:30 -0400 | [diff] [blame] | 123 | |
Kyle Edwards | 6051a49 | 2020-06-12 15:11:04 -0400 | [diff] [blame] | 124 | /** Return true if building for Android */ |
| 125 | bool TargetsAndroid() const { return this->SystemIsAndroid; } |
| 126 | |
Vitaly Stakhovsky | cfe4e2d | 2017-12-15 21:17:49 -0500 | [diff] [blame] | 127 | const char* GetCMakeCFGIntDir() const override { return "$(Configuration)"; } |
Brad King | 72333a4 | 2012-04-18 15:50:49 -0400 | [diff] [blame] | 128 | |
| 129 | /** Generate an <output>.rule file path for a given command output. */ |
Vitaly Stakhovsky | cfe4e2d | 2017-12-15 21:17:49 -0500 | [diff] [blame] | 130 | std::string GenerateRuleFile(std::string const& output) const override; |
Brad King | 72333a4 | 2012-04-18 15:50:49 -0400 | [diff] [blame] | 131 | |
Stephen Kelly | 459c891 | 2015-10-22 18:27:57 +0200 | [diff] [blame] | 132 | void PathTooLong(cmGeneratorTarget* target, cmSourceFile const* sf, |
Brad King | d931ce9 | 2012-04-27 14:13:02 -0400 | [diff] [blame] | 133 | std::string const& sfRel); |
Robert Maynard | 3064f80 | 2013-08-20 14:59:59 -0400 | [diff] [blame] | 134 | |
Vitaly Stakhovsky | 907bc35 | 2017-12-13 19:16:54 -0500 | [diff] [blame] | 135 | std::string Encoding() override; |
Brad King | d07f453 | 2019-01-09 11:21:20 -0500 | [diff] [blame] | 136 | const char* GetToolsVersion() const; |
Robert Maynard | 3064f80 | 2013-08-20 14:59:59 -0400 | [diff] [blame] | 137 | |
Brad King | 3fd65f5 | 2021-06-17 07:30:48 -0400 | [diff] [blame] | 138 | virtual cm::optional<std::string> GetVSInstanceVersion() const { return {}; } |
Brad King | aabc3ca | 2021-06-16 10:53:22 -0400 | [diff] [blame] | 139 | |
Brad King | 9135954 | 2020-02-04 11:37:22 -0500 | [diff] [blame] | 140 | bool GetSupportsUnityBuilds() const { return this->SupportsUnityBuilds; } |
| 141 | |
Brad King | 6999b87 | 2021-10-20 12:01:53 -0400 | [diff] [blame] | 142 | virtual cm::optional<std::string> FindMSBuildCommandEarly(cmMakefile* mf); |
| 143 | |
Brad King | 0b33aee | 2017-09-15 09:56:26 -0400 | [diff] [blame] | 144 | bool FindMakeProgram(cmMakefile* mf) override; |
Brad King | 0c55729 | 2013-12-04 10:35:04 -0500 | [diff] [blame] | 145 | |
Niels Dekker | 567fabe | 2018-09-09 23:04:59 +0200 | [diff] [blame] | 146 | bool IsIPOSupported() const override { return true; } |
| 147 | |
Justin Goshi | e219527 | 2020-06-02 12:46:07 -0700 | [diff] [blame] | 148 | virtual bool IsStdOutEncodingSupported() const { return false; } |
| 149 | |
Gustavo Varo | 9ba99a1 | 2021-06-16 18:05:55 -0400 | [diff] [blame] | 150 | virtual bool IsUtf8EncodingSupported() const { return false; } |
| 151 | |
Brad King | 2f07146 | 2014-07-18 11:12:11 -0400 | [diff] [blame] | 152 | static std::string GetInstalledNsightTegraVersion(); |
| 153 | |
Brad King | 639e14d | 2019-05-21 08:45:20 -0400 | [diff] [blame] | 154 | /** Return the first two components of CMAKE_SYSTEM_VERSION. */ |
| 155 | std::string GetApplicationTypeRevision() const; |
| 156 | |
Kyle Edwards | 6051a49 | 2020-06-12 15:11:04 -0400 | [diff] [blame] | 157 | virtual const char* GetAndroidApplicationTypeRevision() const { return ""; } |
| 158 | |
Don Olmstead | e2ed9a7 | 2016-10-17 17:50:34 -0700 | [diff] [blame] | 159 | cmIDEFlagTable const* GetClFlagTable() const; |
Michael Stürmer | 9b06c22 | 2016-12-01 12:52:57 +0100 | [diff] [blame] | 160 | cmIDEFlagTable const* GetCSharpFlagTable() const; |
Don Olmstead | e2ed9a7 | 2016-10-17 17:50:34 -0700 | [diff] [blame] | 161 | cmIDEFlagTable const* GetRcFlagTable() const; |
| 162 | cmIDEFlagTable const* GetLibFlagTable() const; |
| 163 | cmIDEFlagTable const* GetLinkFlagTable() const; |
Brad King | 041ebda | 2017-03-07 15:47:50 -0500 | [diff] [blame] | 164 | cmIDEFlagTable const* GetCudaFlagTable() const; |
| 165 | cmIDEFlagTable const* GetCudaHostFlagTable() const; |
Ilia K | 3166547 | 2022-10-14 13:24:47 +0200 | [diff] [blame] | 166 | cmIDEFlagTable const* GetMarmasmFlagTable() const; |
Don Olmstead | e2ed9a7 | 2016-10-17 17:50:34 -0700 | [diff] [blame] | 167 | cmIDEFlagTable const* GetMasmFlagTable() const; |
Evgeny Fimochkin | 5ba2c9e | 2017-01-27 19:31:50 +0700 | [diff] [blame] | 168 | cmIDEFlagTable const* GetNasmFlagTable() const; |
Don Olmstead | e2ed9a7 | 2016-10-17 17:50:34 -0700 | [diff] [blame] | 169 | |
Carsten Rudolph | b2f8f0b | 2022-01-22 10:29:46 +0100 | [diff] [blame] | 170 | bool IsMsBuildRestoreSupported() const; |
| 171 | |
Brad King | 09e398f | 2009-09-16 11:44:08 -0400 | [diff] [blame] | 172 | protected: |
Brad King | 40a7328 | 2019-01-10 08:37:40 -0500 | [diff] [blame] | 173 | cmGlobalVisualStudio10Generator(cmake* cm, const std::string& name, |
| 174 | std::string const& platformInGeneratorName); |
| 175 | |
Vitaly Stakhovsky | cfe4e2d | 2017-12-15 21:17:49 -0500 | [diff] [blame] | 176 | void Generate() override; |
Brad King | e58f975 | 2014-07-28 15:37:15 -0400 | [diff] [blame] | 177 | virtual bool InitializeSystem(cmMakefile* mf); |
Gilles Khouzam | 5dfc4c5 | 2015-09-23 14:27:07 -0700 | [diff] [blame] | 178 | virtual bool InitializeWindows(cmMakefile* mf); |
Pascal Bach | a3298f7 | 2014-09-15 15:46:43 +0200 | [diff] [blame] | 179 | virtual bool InitializeWindowsCE(cmMakefile* mf); |
Brad King | d7938bf | 2014-07-28 16:15:43 -0400 | [diff] [blame] | 180 | virtual bool InitializeWindowsPhone(cmMakefile* mf); |
| 181 | virtual bool InitializeWindowsStore(cmMakefile* mf); |
Kyle Edwards | 6051a49 | 2020-06-12 15:11:04 -0400 | [diff] [blame] | 182 | virtual bool InitializeTegraAndroid(cmMakefile* mf); |
| 183 | virtual bool InitializeAndroid(cmMakefile* mf); |
Gilles Khouzam | b20a32a | 2014-11-13 11:47:01 -0800 | [diff] [blame] | 184 | |
Brad King | f773933 | 2017-02-08 15:25:23 -0500 | [diff] [blame] | 185 | virtual bool ProcessGeneratorToolsetField(std::string const& key, |
| 186 | std::string const& value); |
| 187 | |
Pascal Bach | a3298f7 | 2014-09-15 15:46:43 +0200 | [diff] [blame] | 188 | virtual std::string SelectWindowsCEToolset() const; |
Gilles Khouzam | b20a32a | 2014-11-13 11:47:01 -0800 | [diff] [blame] | 189 | virtual bool SelectWindowsPhoneToolset(std::string& toolset) const; |
| 190 | virtual bool SelectWindowsStoreToolset(std::string& toolset) const; |
Brad King | f5c0efd | 2014-07-22 15:01:05 -0400 | [diff] [blame] | 191 | |
Brad King | 58a50a3 | 2021-03-11 16:59:20 -0500 | [diff] [blame] | 192 | enum class AuxToolset |
| 193 | { |
| 194 | None, |
| 195 | Default, |
| 196 | PropsExist, |
Nicholas Sinlock | f972e4f | 2022-09-01 14:43:19 -0700 | [diff] [blame] | 197 | PropsMissing, |
| 198 | PropsIndeterminate |
Brad King | 58a50a3 | 2021-03-11 16:59:20 -0500 | [diff] [blame] | 199 | }; |
| 200 | virtual AuxToolset FindAuxToolset(std::string& version, |
| 201 | std::string& props) const; |
| 202 | |
Brad King | 5f5c92b | 2013-11-13 14:27:51 -0500 | [diff] [blame] | 203 | std::string const& GetMSBuildCommand(); |
| 204 | |
Brad King | 414b5e0 | 2021-03-04 15:34:34 -0500 | [diff] [blame] | 205 | cmIDEFlagTable const* LoadFlagTable(std::string const& toolSpecificName, |
Stephan Szabo | c8ba777 | 2019-01-03 12:54:24 -0800 | [diff] [blame] | 206 | std::string const& defaultName, |
Stephan Szabo | 6d855fb | 2018-11-28 07:32:14 -0800 | [diff] [blame] | 207 | std::string const& table) const; |
| 208 | |
Brad King | 98afb45 | 2014-06-04 13:09:35 -0400 | [diff] [blame] | 209 | std::string GeneratorToolset; |
Brad King | 58a50a3 | 2021-03-11 16:59:20 -0500 | [diff] [blame] | 210 | std::string GeneratorToolsetVersionProps; |
Brad King | d079e71 | 2016-10-07 15:57:04 -0400 | [diff] [blame] | 211 | std::string GeneratorToolsetHostArchitecture; |
Alexander Boczar | 548e905 | 2019-09-16 14:14:20 -0700 | [diff] [blame] | 212 | std::string GeneratorToolsetCustomVCTargetsDir; |
Brad King | 5164e9a | 2017-02-08 16:05:08 -0500 | [diff] [blame] | 213 | std::string GeneratorToolsetCuda; |
Benjamin Wozniak | df0247a | 2019-08-21 15:27:42 +0200 | [diff] [blame] | 214 | std::string GeneratorToolsetCudaCustomDir; |
Marcel Ritzschke | c73b847 | 2021-03-14 18:14:19 +0100 | [diff] [blame] | 215 | std::string GeneratorToolsetCudaNvccSubdir; |
| 216 | std::string GeneratorToolsetCudaVSIntegrationSubdir; |
Brad King | 98afb45 | 2014-06-04 13:09:35 -0400 | [diff] [blame] | 217 | std::string DefaultPlatformToolset; |
Brad King | 0fd742a | 2019-01-28 10:49:16 -0500 | [diff] [blame] | 218 | std::string DefaultPlatformToolsetHostArchitecture; |
Kyle Edwards | 6051a49 | 2020-06-12 15:11:04 -0400 | [diff] [blame] | 219 | std::string DefaultAndroidToolset; |
Gilles Khouzam | 3f07799 | 2015-09-30 13:22:43 -0700 | [diff] [blame] | 220 | std::string WindowsTargetPlatformVersion; |
Brad King | d0dd28f | 2014-07-28 15:33:40 -0400 | [diff] [blame] | 221 | std::string SystemName; |
| 222 | std::string SystemVersion; |
Brad King | 2f07146 | 2014-07-18 11:12:11 -0400 | [diff] [blame] | 223 | std::string NsightTegraVersion; |
Stephan Szabo | 6d855fb | 2018-11-28 07:32:14 -0800 | [diff] [blame] | 224 | std::string DefaultCLFlagTableName; |
| 225 | std::string DefaultCSharpFlagTableName; |
| 226 | std::string DefaultLibFlagTableName; |
| 227 | std::string DefaultLinkFlagTableName; |
| 228 | std::string DefaultCudaFlagTableName; |
| 229 | std::string DefaultCudaHostFlagTableName; |
Ilia K | 3166547 | 2022-10-14 13:24:47 +0200 | [diff] [blame] | 230 | std::string DefaultMarmasmFlagTableName; |
Stephan Szabo | 6d855fb | 2018-11-28 07:32:14 -0800 | [diff] [blame] | 231 | std::string DefaultMasmFlagTableName; |
| 232 | std::string DefaultNasmFlagTableName; |
| 233 | std::string DefaultRCFlagTableName; |
Brad King | 9135954 | 2020-02-04 11:37:22 -0500 | [diff] [blame] | 234 | bool SupportsUnityBuilds = false; |
Kyle Edwards | 1445692 | 2020-06-15 17:02:02 -0400 | [diff] [blame] | 235 | bool SystemIsWindowsCE = false; |
| 236 | bool SystemIsWindowsPhone = false; |
| 237 | bool SystemIsWindowsStore = false; |
Kyle Edwards | 6051a49 | 2020-06-12 15:11:04 -0400 | [diff] [blame] | 238 | bool SystemIsAndroid = false; |
Brad King | 6511654 | 2021-10-20 11:56:42 -0400 | [diff] [blame] | 239 | bool MSBuildCommandInitialized = false; |
Peter Kuemmel | a0700ba | 2012-06-02 19:58:03 +0200 | [diff] [blame] | 240 | |
Brad King | d931ce9 | 2012-04-27 14:13:02 -0400 | [diff] [blame] | 241 | private: |
| 242 | struct LongestSourcePath |
| 243 | { |
Kitware Robot | d9fd2f5 | 2016-05-16 10:34:04 -0400 | [diff] [blame] | 244 | LongestSourcePath() |
| 245 | : Length(0) |
| 246 | , Target(0) |
| 247 | , SourceFile(0) |
| 248 | { |
| 249 | } |
Brad King | d931ce9 | 2012-04-27 14:13:02 -0400 | [diff] [blame] | 250 | size_t Length; |
Stephen Kelly | 459c891 | 2015-10-22 18:27:57 +0200 | [diff] [blame] | 251 | cmGeneratorTarget* Target; |
Stephen Kelly | c725bb3 | 2014-03-12 23:50:42 +0100 | [diff] [blame] | 252 | cmSourceFile const* SourceFile; |
Brad King | d931ce9 | 2012-04-27 14:13:02 -0400 | [diff] [blame] | 253 | std::string SourceRel; |
| 254 | }; |
| 255 | LongestSourcePath LongestSource; |
Brad King | 5f5c92b | 2013-11-13 14:27:51 -0500 | [diff] [blame] | 256 | |
| 257 | std::string MSBuildCommand; |
Kyle Edwards | 6051a49 | 2020-06-12 15:11:04 -0400 | [diff] [blame] | 258 | std::set<std::string> AndroidExecutableWarnings; |
Brad King | 5f5c92b | 2013-11-13 14:27:51 -0500 | [diff] [blame] | 259 | virtual std::string FindMSBuildCommand(); |
Vitaly Stakhovsky | cfe4e2d | 2017-12-15 21:17:49 -0500 | [diff] [blame] | 260 | std::string FindDevEnvCommand() override; |
| 261 | std::string GetVSMakeProgram() override { return this->GetMSBuildCommand(); } |
Brad King | 885ab9a | 2015-04-15 09:30:14 -0400 | [diff] [blame] | 262 | |
Brad King | 58a50a3 | 2021-03-11 16:59:20 -0500 | [diff] [blame] | 263 | std::string GeneratorToolsetVersion; |
| 264 | |
Brad King | 8d6f015 | 2022-09-26 11:49:17 -0400 | [diff] [blame] | 265 | bool PlatformToolsetNeedsDebugEnum = false; |
Brad King | ae44496 | 2017-06-27 15:58:39 -0400 | [diff] [blame] | 266 | |
Brad King | f773933 | 2017-02-08 15:25:23 -0500 | [diff] [blame] | 267 | bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf); |
| 268 | |
Brad King | 1b774e1 | 2021-03-04 13:50:43 -0500 | [diff] [blame] | 269 | std::string GetClFlagTableName() const; |
| 270 | std::string GetCSharpFlagTableName() const; |
| 271 | std::string GetRcFlagTableName() const; |
| 272 | std::string GetLibFlagTableName() const; |
| 273 | std::string GetLinkFlagTableName() const; |
| 274 | std::string GetMasmFlagTableName() const; |
Brad King | a1c0758 | 2021-03-04 13:42:52 -0500 | [diff] [blame] | 275 | std::string CanonicalToolsetName(std::string const& toolset) const; |
Brad King | fe17685 | 2021-03-04 13:10:53 -0500 | [diff] [blame] | 276 | |
Brad King | 1b33150 | 2021-03-04 16:23:52 -0500 | [diff] [blame] | 277 | cm::optional<std::string> FindFlagTable(cm::string_view toolsetName, |
| 278 | cm::string_view table) const; |
| 279 | |
Brad King | 608ef8a | 2021-03-04 16:47:49 -0500 | [diff] [blame] | 280 | std::string CustomFlagTableDir; |
| 281 | |
Alexander Boczar | 548e905 | 2019-09-16 14:14:20 -0700 | [diff] [blame] | 282 | std::string CustomVCTargetsPath; |
Brad King | 83bf980 | 2017-02-08 16:28:39 -0500 | [diff] [blame] | 283 | std::string VCTargetsPath; |
| 284 | bool FindVCTargetsPath(cmMakefile* mf); |
| 285 | |
Brad King | 8d6f015 | 2022-09-26 11:49:17 -0400 | [diff] [blame] | 286 | bool CudaEnabled = false; |
Brad King | 13433b1 | 2017-03-07 15:44:43 -0500 | [diff] [blame] | 287 | |
Brad King | 885ab9a | 2015-04-15 09:30:14 -0400 | [diff] [blame] | 288 | // We do not use the reload macros for VS >= 10. |
Vitaly Stakhovsky | cfe4e2d | 2017-12-15 21:17:49 -0500 | [diff] [blame] | 289 | std::string GetUserMacrosDirectory() override { return ""; } |
Bill Hoffman | 7491f52 | 2009-06-25 16:41:57 -0400 | [diff] [blame] | 290 | }; |