This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via 5a283b79e5fe1739142cc513a9a701855849b2f8 (commit) via b91f6f39f7be92bab1302c4587dd51423f20cf00 (commit) via 89cc3d432bc576d00cb12880b37ec8b348599897 (commit) via 40a732800d52b394d7bd4a81e9aaef04ef5914e6 (commit) via 5ca7e5057bcadbcbe6b933b004ba37ddb5199dba (commit) from 73aca0572b30a46bf5b5e75daa300fabb6bbb8cc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a283b79e5fe1739142cc513a9a701855849b2f8 commit 5a283b79e5fe1739142cc513a9a701855849b2f8 Merge: 73aca05 b91f6f3 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Jan 11 15:35:57 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Fri Jan 11 10:36:03 2019 -0500 Merge topic 'vs-refactor' b91f6f39f7 VS: Track explicitly when platform is specified in generator name 89cc3d432b VS: Move platform name members to top-level global generator 40a732800d VS: Clarify global generator constructor interface 5ca7e5057b Help: Document VS generator default platform selection Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !2786 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b91f6f39f7be92bab1302c4587dd51423f20cf00 commit b91f6f39f7be92bab1302c4587dd51423f20cf00 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jan 10 09:13:54 2019 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jan 10 09:38:35 2019 -0500 VS: Track explicitly when platform is specified in generator name diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 7573153..a6bec4b 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -407,7 +407,7 @@ bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf) return false; } } else if (this->SystemName == "Android") { - if (this->DefaultPlatformName != "Win32") { + if (this->PlatformInGeneratorName) { std::ostringstream e; e << "CMAKE_SYSTEM_NAME is 'Android' but CMAKE_GENERATOR " << "specifies a platform too: '" << this->GetName() << "'"; @@ -438,7 +438,7 @@ bool cmGlobalVisualStudio10Generator::InitializeWindows(cmMakefile*) bool cmGlobalVisualStudio10Generator::InitializeWindowsCE(cmMakefile* mf) { - if (this->DefaultPlatformName != "Win32") { + if (this->PlatformInGeneratorName) { std::ostringstream e; e << "CMAKE_SYSTEM_NAME is 'WindowsCE' but CMAKE_GENERATOR " << "specifies a platform too: '" << this->GetName() << "'"; diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 616328d..55284c9 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -61,7 +61,7 @@ void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf) bool cmGlobalVisualStudio8Generator::SetGeneratorPlatform(std::string const& p, cmMakefile* mf) { - if (this->DefaultPlatformName == "Win32") { + if (!this->PlatformInGeneratorName) { this->GeneratorPlatform = p; return this->cmGlobalVisualStudio7Generator::SetGeneratorPlatform("", mf); } else { diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 4828c8a..dc8de03 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -32,6 +32,7 @@ cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator( this->DefaultPlatformName = "Win32"; } else { this->DefaultPlatformName = platformInGeneratorName; + this->PlatformInGeneratorName = true; } } diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 3909a26..d44f5a5 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -178,6 +178,7 @@ protected: std::string GeneratorPlatform; std::string DefaultPlatformName; + bool PlatformInGeneratorName = false; private: virtual std::string GetVSMakeProgram() = 0; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89cc3d432bc576d00cb12880b37ec8b348599897 commit 89cc3d432bc576d00cb12880b37ec8b348599897 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jan 10 08:43:29 2019 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jan 10 09:38:35 2019 -0500 VS: Move platform name members to top-level global generator We no longer support any VS versions that pre-date support for multiple platforms (target architectures). diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 84f8df1..5855177 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -42,18 +42,12 @@ static cmVS7FlagTable cmVS7ExtraFlagTable[] = { cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator( cmake* cm, std::string const& platformInGeneratorName) - : cmGlobalVisualStudioGenerator(cm) + : cmGlobalVisualStudioGenerator(cm, platformInGeneratorName) { this->IntelProjectVersion = 0; this->DevEnvCommandInitialized = false; this->MasmEnabled = false; this->NasmEnabled = false; - - if (platformInGeneratorName.empty()) { - this->DefaultPlatformName = "Win32"; - } else { - this->DefaultPlatformName = platformInGeneratorName; - } this->ExtraFlagTable = cmVS7ExtraFlagTable; } @@ -263,14 +257,6 @@ Json::Value cmGlobalVisualStudio7Generator::GetJson() const } #endif -std::string const& cmGlobalVisualStudio7Generator::GetPlatformName() const -{ - if (!this->GeneratorPlatform.empty()) { - return this->GeneratorPlatform; - } - return this->DefaultPlatformName; -} - bool cmGlobalVisualStudio7Generator::SetSystemName(std::string const& s, cmMakefile* mf) { @@ -279,18 +265,6 @@ bool cmGlobalVisualStudio7Generator::SetSystemName(std::string const& s, return this->cmGlobalVisualStudioGenerator::SetSystemName(s, mf); } -bool cmGlobalVisualStudio7Generator::SetGeneratorPlatform(std::string const& p, - cmMakefile* mf) -{ - if (this->GetPlatformName() == "x64") { - mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); - } else if (this->GetPlatformName() == "Itanium") { - mf->AddDefinition("CMAKE_FORCE_IA64", "TRUE"); - } - mf->AddDefinition("CMAKE_VS_PLATFORM_NAME", this->GetPlatformName().c_str()); - return this->cmGlobalVisualStudioGenerator::SetGeneratorPlatform(p, mf); -} - void cmGlobalVisualStudio7Generator::Generate() { // first do the superclass method diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 4240bd4..d2a2a38 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -20,9 +20,6 @@ class cmGlobalVisualStudio7Generator : public cmGlobalVisualStudioGenerator public: ~cmGlobalVisualStudio7Generator(); - ///! Get the name for the platform. - std::string const& GetPlatformName() const; - ///! Create a local generator appropriate to this Global Generator cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf) override; @@ -32,8 +29,6 @@ public: bool SetSystemName(std::string const& s, cmMakefile* mf) override; - bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override; - /** * Utilized by the generator factory to determine if this generator * supports toolsets. @@ -167,8 +162,6 @@ protected: // Set during OutputSLNFile with the name of the current project. // There is one SLN file per project. std::string CurrentProject; - std::string GeneratorPlatform; - std::string DefaultPlatformName; bool MasmEnabled; bool NasmEnabled; diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index adf0a81..4828c8a 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -20,12 +20,19 @@ #include "cmState.h" #include "cmTarget.h" -cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator(cmake* cm) +cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator( + cmake* cm, std::string const& platformInGeneratorName) : cmGlobalGenerator(cm) { cm->GetState()->SetIsGeneratorMultiConfig(true); cm->GetState()->SetWindowsShell(true); cm->GetState()->SetWindowsVSIDE(true); + + if (platformInGeneratorName.empty()) { + this->DefaultPlatformName = "Win32"; + } else { + this->DefaultPlatformName = platformInGeneratorName; + } } cmGlobalVisualStudioGenerator::~cmGlobalVisualStudioGenerator() @@ -43,6 +50,26 @@ void cmGlobalVisualStudioGenerator::SetVersion(VSVersion v) this->Version = v; } +bool cmGlobalVisualStudioGenerator::SetGeneratorPlatform(std::string const& p, + cmMakefile* mf) +{ + if (this->GetPlatformName() == "x64") { + mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); + } else if (this->GetPlatformName() == "Itanium") { + mf->AddDefinition("CMAKE_FORCE_IA64", "TRUE"); + } + mf->AddDefinition("CMAKE_VS_PLATFORM_NAME", this->GetPlatformName().c_str()); + return this->cmGlobalGenerator::SetGeneratorPlatform(p, mf); +} + +std::string const& cmGlobalVisualStudioGenerator::GetPlatformName() const +{ + if (!this->GeneratorPlatform.empty()) { + return this->GeneratorPlatform; + } + return this->DefaultPlatformName; +} + const char* cmGlobalVisualStudioGenerator::GetIDEVersion() const { switch (this->Version) { diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index d827616..3909a26 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -49,6 +49,14 @@ public: /** Is the installed VS an Express edition? */ bool IsExpressEdition() const { return this->ExpressEdition; } + bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override; + + /** + * Get the name of the target platform (architecture) for which we generate. + * The names are as defined by VS, e.g. "Win32", "x64", "Itanium", "ARM". + */ + std::string const& GetPlatformName() const; + /** * Configure CMake's Visual Studio macros file into the user's Visual * Studio macros directory. @@ -132,7 +140,8 @@ public: bool dryRun) override; protected: - cmGlobalVisualStudioGenerator(cmake* cm); + cmGlobalVisualStudioGenerator(cmake* cm, + std::string const& platformInGeneratorName); void AddExtraIDETargets() override; @@ -167,6 +176,9 @@ protected: VSVersion Version; bool ExpressEdition; + std::string GeneratorPlatform; + std::string DefaultPlatformName; + private: virtual std::string GetVSMakeProgram() = 0; void PrintCompilerAdvice(std::ostream&, std::string const&, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40a732800d52b394d7bd4a81e9aaef04ef5914e6 commit 40a732800d52b394d7bd4a81e9aaef04ef5914e6 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jan 10 08:37:40 2019 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jan 10 09:38:35 2019 -0500 VS: Clarify global generator constructor interface Make the constructors protected since they should be produced through factories. Also rename `platform{ => InGenerator}Name` to clarify the meaning of the argument. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 4709194..7573153 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -90,8 +90,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory() } cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( - cmake* cm, const std::string& name, const std::string& platformName) - : cmGlobalVisualStudio8Generator(cm, name, platformName) + cmake* cm, const std::string& name, + std::string const& platformInGeneratorName) + : cmGlobalVisualStudio8Generator(cm, name, platformInGeneratorName) { std::string vc10Express; this->ExpressEdition = cmSystemTools::ReadRegistryValue( diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 1e72959..7f7c516 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -14,8 +14,6 @@ class cmGlobalVisualStudio10Generator : public cmGlobalVisualStudio8Generator { public: - cmGlobalVisualStudio10Generator(cmake* cm, const std::string& name, - const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); bool MatchesGeneratorName(const std::string& name) const override; @@ -125,6 +123,9 @@ public: cmIDEFlagTable const* GetNasmFlagTable() const; protected: + cmGlobalVisualStudio10Generator(cmake* cm, const std::string& name, + std::string const& platformInGeneratorName); + void Generate() override; virtual bool InitializeSystem(cmMakefile* mf); virtual bool InitializeWindows(cmMakefile* mf); @@ -168,6 +169,8 @@ protected: private: class Factory; + friend class Factory; + struct LongestSourcePath { LongestSourcePath() diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 499ae32..07318cf 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -92,8 +92,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory() } cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator( - cmake* cm, const std::string& name, const std::string& platformName) - : cmGlobalVisualStudio10Generator(cm, name, platformName) + cmake* cm, const std::string& name, + std::string const& platformInGeneratorName) + : cmGlobalVisualStudio10Generator(cm, name, platformInGeneratorName) { std::string vc11Express; this->ExpressEdition = cmSystemTools::ReadRegistryValue( diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 6346da2..8b4c8b7 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -20,13 +20,14 @@ class cmake; class cmGlobalVisualStudio11Generator : public cmGlobalVisualStudio10Generator { public: - cmGlobalVisualStudio11Generator(cmake* cm, const std::string& name, - const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); bool MatchesGeneratorName(const std::string& name) const override; protected: + cmGlobalVisualStudio11Generator(cmake* cm, const std::string& name, + std::string const& platformInGeneratorName); + bool InitializeWindowsPhone(cmMakefile* mf) override; bool InitializeWindowsStore(cmMakefile* mf) override; bool SelectWindowsPhoneToolset(std::string& toolset) const override; diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 2cec48c..f9da68c 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -75,8 +75,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory() } cmGlobalVisualStudio12Generator::cmGlobalVisualStudio12Generator( - cmake* cm, const std::string& name, const std::string& platformName) - : cmGlobalVisualStudio11Generator(cm, name, platformName) + cmake* cm, const std::string& name, + std::string const& platformInGeneratorName) + : cmGlobalVisualStudio11Generator(cm, name, platformInGeneratorName) { std::string vc12Express; this->ExpressEdition = cmSystemTools::ReadRegistryValue( diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 1b7bbc9..53b7091 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -18,13 +18,14 @@ class cmake; class cmGlobalVisualStudio12Generator : public cmGlobalVisualStudio11Generator { public: - cmGlobalVisualStudio12Generator(cmake* cm, const std::string& name, - const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); bool MatchesGeneratorName(const std::string& name) const override; protected: + cmGlobalVisualStudio12Generator(cmake* cm, const std::string& name, + std::string const& platformInGeneratorName); + bool ProcessGeneratorToolsetField(std::string const& key, std::string const& value) override; @@ -44,5 +45,6 @@ protected: private: class Factory; + friend class Factory; }; #endif diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index a6dbc23..8f7dac9 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -75,8 +75,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio14Generator::NewFactory() } cmGlobalVisualStudio14Generator::cmGlobalVisualStudio14Generator( - cmake* cm, const std::string& name, const std::string& platformName) - : cmGlobalVisualStudio12Generator(cm, name, platformName) + cmake* cm, const std::string& name, + std::string const& platformInGeneratorName) + : cmGlobalVisualStudio12Generator(cm, name, platformInGeneratorName) { std::string vc14Express; this->ExpressEdition = cmSystemTools::ReadRegistryValue( diff --git a/Source/cmGlobalVisualStudio14Generator.h b/Source/cmGlobalVisualStudio14Generator.h index 4be21e0..32008b0 100644 --- a/Source/cmGlobalVisualStudio14Generator.h +++ b/Source/cmGlobalVisualStudio14Generator.h @@ -18,13 +18,14 @@ class cmake; class cmGlobalVisualStudio14Generator : public cmGlobalVisualStudio12Generator { public: - cmGlobalVisualStudio14Generator(cmake* cm, const std::string& name, - const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); bool MatchesGeneratorName(const std::string& name) const override; protected: + cmGlobalVisualStudio14Generator(cmake* cm, const std::string& name, + std::string const& platformInGeneratorName); + bool InitializeWindows(cmMakefile* mf) override; bool InitializeWindowsStore(cmMakefile* mf) override; bool SelectWindowsStoreToolset(std::string& toolset) const override; @@ -47,5 +48,6 @@ protected: private: class Factory; + friend class Factory; }; #endif diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index 2af17e8..eb49e87 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -76,8 +76,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio15Generator::NewFactory() } cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator( - cmake* cm, const std::string& name, const std::string& platformName) - : cmGlobalVisualStudio14Generator(cm, name, platformName) + cmake* cm, const std::string& name, + std::string const& platformInGeneratorName) + : cmGlobalVisualStudio14Generator(cm, name, platformInGeneratorName) { this->ExpressEdition = false; this->DefaultPlatformToolset = "v141"; diff --git a/Source/cmGlobalVisualStudio15Generator.h b/Source/cmGlobalVisualStudio15Generator.h index 233f3bc..da85d23 100644 --- a/Source/cmGlobalVisualStudio15Generator.h +++ b/Source/cmGlobalVisualStudio15Generator.h @@ -18,8 +18,6 @@ class cmake; class cmGlobalVisualStudio15Generator : public cmGlobalVisualStudio14Generator { public: - cmGlobalVisualStudio15Generator(cmake* cm, const std::string& name, - const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); bool MatchesGeneratorName(const std::string& name) const override; @@ -32,6 +30,9 @@ public: std::string GetAuxiliaryToolset() const override; protected: + cmGlobalVisualStudio15Generator(cmake* cm, const std::string& name, + std::string const& platformInGeneratorName); + bool InitializeWindows(cmMakefile* mf) override; bool SelectWindowsStoreToolset(std::string& toolset) const override; @@ -53,6 +54,7 @@ protected: private: class Factory; + friend class Factory; mutable cmVSSetupAPIHelper vsSetupAPIHelper; }; #endif diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 3648086..84f8df1 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -41,7 +41,7 @@ static cmVS7FlagTable cmVS7ExtraFlagTable[] = { }; cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator( - cmake* cm, const std::string& platformName) + cmake* cm, std::string const& platformInGeneratorName) : cmGlobalVisualStudioGenerator(cm) { this->IntelProjectVersion = 0; @@ -49,10 +49,10 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator( this->MasmEnabled = false; this->NasmEnabled = false; - if (platformName.empty()) { + if (platformInGeneratorName.empty()) { this->DefaultPlatformName = "Win32"; } else { - this->DefaultPlatformName = platformName; + this->DefaultPlatformName = platformInGeneratorName; } this->ExtraFlagTable = cmVS7ExtraFlagTable; } diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index f092b56..4240bd4 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -18,8 +18,6 @@ struct cmIDEFlagTable; class cmGlobalVisualStudio7Generator : public cmGlobalVisualStudioGenerator { public: - cmGlobalVisualStudio7Generator(cmake* cm, - const std::string& platformName = ""); ~cmGlobalVisualStudio7Generator(); ///! Get the name for the platform. @@ -110,6 +108,9 @@ public: cmIDEFlagTable const* ExtraFlagTable; protected: + cmGlobalVisualStudio7Generator(cmake* cm, + std::string const& platformInGeneratorName); + void Generate() override; std::string const& GetDevEnvCommand(); diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index ee118f1..616328d 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -12,8 +12,9 @@ #include "cmake.h" cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator( - cmake* cm, const std::string& name, const std::string& platformName) - : cmGlobalVisualStudio71Generator(cm, platformName) + cmake* cm, const std::string& name, + std::string const& platformInGeneratorName) + : cmGlobalVisualStudio71Generator(cm, platformInGeneratorName) { this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms"; this->Name = name; diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index cacfa68..8719bf3 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -13,9 +13,6 @@ class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator { public: - cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name, - const std::string& platformName); - ///! Get the name for the generator. std::string GetName() const override { return this->Name; } @@ -45,6 +42,9 @@ public: } protected: + cmGlobalVisualStudio8Generator(cmake* cm, const std::string& name, + std::string const& platformInGeneratorName); + void AddExtraIDETargets() override; std::string FindDevEnvCommand() override; diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx index 760cce4..e784595 100644 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -83,8 +83,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory() } cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator( - cmake* cm, const std::string& name, const std::string& platformName) - : cmGlobalVisualStudio8Generator(cm, name, platformName) + cmake* cm, const std::string& name, + std::string const& platformInGeneratorName) + : cmGlobalVisualStudio8Generator(cm, name, platformInGeneratorName) { this->Version = VS9; std::string vc9Express; diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h index e537a3d..7bebfd6 100644 --- a/Source/cmGlobalVisualStudio9Generator.h +++ b/Source/cmGlobalVisualStudio9Generator.h @@ -13,8 +13,6 @@ class cmGlobalVisualStudio9Generator : public cmGlobalVisualStudio8Generator { public: - cmGlobalVisualStudio9Generator(cmake* cm, const std::string& name, - const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); /** @@ -30,6 +28,10 @@ public: */ std::string GetUserMacrosRegKeyBase() override; +protected: + cmGlobalVisualStudio9Generator(cmake* cm, const std::string& name, + std::string const& platformInGeneratorName); + private: class Factory; friend class Factory; diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 0d4491d..d827616 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -41,7 +41,6 @@ public: VS15 = 150 }; - cmGlobalVisualStudioGenerator(cmake* cm); virtual ~cmGlobalVisualStudioGenerator(); VSVersion GetVersion() const; @@ -133,6 +132,8 @@ public: bool dryRun) override; protected: + cmGlobalVisualStudioGenerator(cmake* cm); + void AddExtraIDETargets() override; // Does this VS version link targets to each other if there are https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ca7e5057bcadbcbe6b933b004ba37ddb5199dba commit 5ca7e5057bcadbcbe6b933b004ba37ddb5199dba Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jan 10 09:30:52 2019 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jan 10 09:38:35 2019 -0500 Help: Document VS generator default platform selection diff --git a/Help/generator/Visual Studio 10 2010.rst b/Help/generator/Visual Studio 10 2010.rst index 0446b8c..4bf9a8f 100644 --- a/Help/generator/Visual Studio 10 2010.rst +++ b/Help/generator/Visual Studio 10 2010.rst @@ -15,6 +15,8 @@ projects (Database, Website, etc.) are not supported. Platform Selection ^^^^^^^^^^^^^^^^^^ +The default target platform name (architecture) is ``Win32``. + The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps via the :manual:`cmake(1)` ``-A`` option, to specify a target platform name (architecture). For example: diff --git a/Help/generator/Visual Studio 11 2012.rst b/Help/generator/Visual Studio 11 2012.rst index 8fddbb3..5d89a6e 100644 --- a/Help/generator/Visual Studio 11 2012.rst +++ b/Help/generator/Visual Studio 11 2012.rst @@ -15,6 +15,8 @@ projects (JavaScript, Database, Website, etc.) are not supported. Platform Selection ^^^^^^^^^^^^^^^^^^ +The default target platform name (architecture) is ``Win32``. + The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps via the :manual:`cmake(1)` ``-A`` option, to specify a target platform name (architecture). For example: diff --git a/Help/generator/Visual Studio 12 2013.rst b/Help/generator/Visual Studio 12 2013.rst index 8b4c162..d342c53 100644 --- a/Help/generator/Visual Studio 12 2013.rst +++ b/Help/generator/Visual Studio 12 2013.rst @@ -15,6 +15,8 @@ projects (JavaScript, Powershell, Python, etc.) are not supported. Platform Selection ^^^^^^^^^^^^^^^^^^ +The default target platform name (architecture) is ``Win32``. + The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps via the :manual:`cmake(1)` ``-A`` option, to specify a target platform name (architecture). For example: diff --git a/Help/generator/Visual Studio 14 2015.rst b/Help/generator/Visual Studio 14 2015.rst index 917d8e5..106b7c5 100644 --- a/Help/generator/Visual Studio 14 2015.rst +++ b/Help/generator/Visual Studio 14 2015.rst @@ -12,6 +12,8 @@ projects (JavaScript, Powershell, Python, etc.) are not supported. Platform Selection ^^^^^^^^^^^^^^^^^^ +The default target platform name (architecture) is ``Win32``. + The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps via the :manual:`cmake(1)` ``-A`` option, to specify a target platform name (architecture). For example: diff --git a/Help/generator/Visual Studio 15 2017.rst b/Help/generator/Visual Studio 15 2017.rst index 42a3bb6..52c1fa0 100644 --- a/Help/generator/Visual Studio 15 2017.rst +++ b/Help/generator/Visual Studio 15 2017.rst @@ -28,6 +28,8 @@ by default. Platform Selection ^^^^^^^^^^^^^^^^^^ +The default target platform name (architecture) is ``Win32``. + The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps via the :manual:`cmake(1)` ``-A`` option, to specify a target platform name (architecture). For example: diff --git a/Help/generator/Visual Studio 9 2008.rst b/Help/generator/Visual Studio 9 2008.rst index a29033f..a09d047 100644 --- a/Help/generator/Visual Studio 9 2008.rst +++ b/Help/generator/Visual Studio 9 2008.rst @@ -6,6 +6,8 @@ Generates Visual Studio 9 2008 project files. Platform Selection ^^^^^^^^^^^^^^^^^^ +The default target platform name (architecture) is ``Win32``. + The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps via the :manual:`cmake(1)` ``-A`` option, to specify a target platform name (architecture). For example: ----------------------------------------------------------------------- Summary of changes: Help/generator/Visual Studio 10 2010.rst | 2 ++ Help/generator/Visual Studio 11 2012.rst | 2 ++ Help/generator/Visual Studio 12 2013.rst | 2 ++ Help/generator/Visual Studio 14 2015.rst | 2 ++ Help/generator/Visual Studio 15 2017.rst | 2 ++ Help/generator/Visual Studio 9 2008.rst | 2 ++ Source/cmGlobalVisualStudio10Generator.cxx | 9 +++++---- Source/cmGlobalVisualStudio10Generator.h | 7 +++++-- Source/cmGlobalVisualStudio11Generator.cxx | 5 +++-- Source/cmGlobalVisualStudio11Generator.h | 5 +++-- Source/cmGlobalVisualStudio12Generator.cxx | 5 +++-- Source/cmGlobalVisualStudio12Generator.h | 6 ++++-- Source/cmGlobalVisualStudio14Generator.cxx | 5 +++-- Source/cmGlobalVisualStudio14Generator.h | 6 ++++-- Source/cmGlobalVisualStudio15Generator.cxx | 5 +++-- Source/cmGlobalVisualStudio15Generator.h | 6 ++++-- Source/cmGlobalVisualStudio7Generator.cxx | 30 ++---------------------------- Source/cmGlobalVisualStudio7Generator.h | 12 +++--------- Source/cmGlobalVisualStudio8Generator.cxx | 7 ++++--- Source/cmGlobalVisualStudio8Generator.h | 6 +++--- Source/cmGlobalVisualStudio9Generator.cxx | 5 +++-- Source/cmGlobalVisualStudio9Generator.h | 6 ++++-- Source/cmGlobalVisualStudioGenerator.cxx | 30 +++++++++++++++++++++++++++++- Source/cmGlobalVisualStudioGenerator.h | 16 +++++++++++++++- 24 files changed, 112 insertions(+), 71 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits