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, next has been updated via 961f90fa7168c618ec7c98857887b3a22cff0c9d (commit) via e7fdb44b1be63e18d03e86f61611dba677e98978 (commit) via 6e176e6d9efa80fb4d08f1ead6bc33f115f8885d (commit) via d3d9218a52dad04c1cfa87e537d98ee0678db1db (commit) via eeb60102e813c6c69546e4257a332ede4e234171 (commit) via ecb34faaaba841aac6dae722dd2c6256a1472d74 (commit) from 543d27db2cb4aa56bfe15fa5ee86b952df9a9b83 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=961f90fa7168c618ec7c98857887b3a22cff0c9d commit 961f90fa7168c618ec7c98857887b3a22cff0c9d Merge: 543d27d e7fdb44 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 17 16:46:37 2014 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Jul 17 16:46:37 2014 -0400 Merge topic 'delay-generator-platform' into next e7fdb44b VS: Delay detection of VS 10 Express 64-bit tools 6e176e6d VS: Delay platform definitions until system name is known d3d9218a VS: Remove unused method from VS 9 generator eeb60102 VS: Refactor CMAKE_FORCE_*64 platform definitions ecb34faa Tell generators about CMAKE_SYSTEM_NAME as soon as it is known http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7fdb44b1be63e18d03e86f61611dba677e98978 commit e7fdb44b1be63e18d03e86f61611dba677e98978 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 17 16:35:41 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 17 16:35:41 2014 -0400 VS: Delay detection of VS 10 Express 64-bit tools Wait until SetSystemName when the CMAKE_SYSTEM_NAME is known. Later the decision to use 64-bit tools may depend on it. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 03b2b2f..043f89d 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -128,6 +128,13 @@ cmGlobalVisualStudio10Generator::SetGeneratorToolset(std::string const& ts, bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s, cmMakefile* mf) { + if(this->PlatformName == "Itanium" || this->PlatformName == "x64") + { + if(this->IsExpressEdition() && !this->Find64BitTools(mf)) + { + return false; + } + } this->AddVSPlatformToolsetDefinition(mf); return this->cmGlobalVisualStudio8Generator::SetSystemName(s, mf); } @@ -203,14 +210,6 @@ void cmGlobalVisualStudio10Generator ::EnableLanguage(std::vector<std::string>const & lang, cmMakefile *mf, bool optional) { - if(this->PlatformName == "Itanium" || this->PlatformName == "x64") - { - if(this->IsExpressEdition() && !this->Find64BitTools(mf)) - { - return; - } - } - for(std::vector<std::string>::const_iterator it = lang.begin(); it != lang.end(); ++it) { http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e176e6d9efa80fb4d08f1ead6bc33f115f8885d commit 6e176e6d9efa80fb4d08f1ead6bc33f115f8885d Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 17 16:34:21 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 17 16:34:21 2014 -0400 VS: Delay platform definitions until system name is known Move the definition of CMAKE_VS_PLATFORM_NAME and other variables that are not needed by CMakeDetermineSystem out of the AddPlatformDefinitions method and into a SetSystemName method. The latter may later use CMAKE_SYSTEM_NAME to decide what platform-specific definitions to add. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 80d08b9..03b2b2f 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -125,10 +125,11 @@ cmGlobalVisualStudio10Generator::SetGeneratorToolset(std::string const& ts, } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio10Generator::AddPlatformDefinitions(cmMakefile* mf) +bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s, + cmMakefile* mf) { - cmGlobalVisualStudio8Generator::AddPlatformDefinitions(mf); this->AddVSPlatformToolsetDefinition(mf); + return this->cmGlobalVisualStudio8Generator::SetSystemName(s, mf); } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 107b646..cb639dd 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -31,6 +31,7 @@ public: virtual bool MatchesGeneratorName(const std::string& name) const; virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf); + virtual bool SetSystemName(std::string const& s, cmMakefile* mf); virtual void GenerateBuildCommand( std::vector<std::string>& makeCommand, @@ -43,8 +44,6 @@ public: std::vector<std::string> const& makeOptions = std::vector<std::string>() ); - virtual void AddPlatformDefinitions(cmMakefile* mf); - ///! create the correct local generator virtual cmLocalGenerator *CreateLocalGenerator(); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 759e81e..602d678 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -80,7 +80,6 @@ void cmGlobalVisualStudio7Generator { mf->AddDefinition("CMAKE_GENERATOR_RC", "rc"); mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); - this->AddPlatformDefinitions(mf); if(!mf->GetDefinition("CMAKE_CONFIGURATION_TYPES")) { mf->AddCacheDefinition( @@ -260,7 +259,8 @@ cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf) +bool cmGlobalVisualStudio7Generator::SetSystemName(std::string const& s, + cmMakefile* mf) { if(this->PlatformName == "x64") { @@ -273,6 +273,7 @@ void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf) mf->AddDefinition("CMAKE_VS_PLATFORM_NAME", this->GetPlatformName().c_str()); mf->AddDefinition("CMAKE_VS_INTEL_Fortran_PROJECT_VERSION", this->GetIntelProjectVersion()); + return this->cmGlobalVisualStudioGenerator::SetSystemName(s, mf); } void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf) diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 291d297..bd84433 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -44,7 +44,7 @@ public: ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); - virtual void AddPlatformDefinitions(cmMakefile* mf); + virtual bool SetSystemName(std::string const& s, cmMakefile* mf); /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 67583de..1bac322 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -133,10 +133,17 @@ cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf) +void cmGlobalVisualStudio8Generator +::EnableLanguage(std::vector<std::string>const & lang, + cmMakefile *mf, bool optional) { - cmGlobalVisualStudio71Generator::AddPlatformDefinitions(mf); + this->AddPlatformDefinitions(mf); + cmGlobalVisualStudio7Generator::EnableLanguage(lang, mf, optional); +} +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf) +{ if(this->TargetsWindowsCE()) { mf->AddDefinition("CMAKE_VS_WINCE_VERSION", diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 07bccee..aea2f01 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -36,6 +36,8 @@ public: ///! Create a local generator appropriate to this Global Generator virtual cmLocalGenerator *CreateLocalGenerator(); + virtual void EnableLanguage(std::vector<std::string>const& languages, + cmMakefile *, bool optional); virtual void AddPlatformDefinitions(cmMakefile* mf); /** http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3d9218a52dad04c1cfa87e537d98ee0678db1db commit d3d9218a52dad04c1cfa87e537d98ee0678db1db Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 17 16:19:27 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 17 16:19:27 2014 -0400 VS: Remove unused method from VS 9 generator diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx index 45608e1..00d9179 100644 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -122,14 +122,6 @@ cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio9Generator -::EnableLanguage(std::vector<std::string>const & lang, - cmMakefile *mf, bool optional) -{ - cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); -} - -//---------------------------------------------------------------------------- std::string cmGlobalVisualStudio9Generator::GetUserMacrosDirectory() { std::string base; diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h index f1c7091..c24d5fe 100644 --- a/Source/cmGlobalVisualStudio9Generator.h +++ b/Source/cmGlobalVisualStudio9Generator.h @@ -35,8 +35,6 @@ public: * Try to determine system infomation such as shared library * extension, pthreads, byte order etc. */ - virtual void EnableLanguage(std::vector<std::string>const& languages, - cmMakefile *, bool optional); virtual void WriteSLNHeader(std::ostream& fout); /** http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eeb60102e813c6c69546e4257a332ede4e234171 commit eeb60102e813c6c69546e4257a332ede4e234171 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 17 16:16:10 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 17 16:17:35 2014 -0400 VS: Refactor CMAKE_FORCE_*64 platform definitions Remove the general infrastructure for these additional platform definitions and hard-code the only two special cases that used it. They are only for historical reasons so no new such cases should be added. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index a6d1c31..80d08b9 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -51,19 +51,19 @@ public: if(!*p) { return new cmGlobalVisualStudio10Generator( - genName, "", ""); + genName, ""); } if(*p++ != ' ') { return 0; } if(strcmp(p, "Win64") == 0) { return new cmGlobalVisualStudio10Generator( - genName, "x64", "CMAKE_FORCE_WIN64"); + genName, "x64"); } if(strcmp(p, "IA64") == 0) { return new cmGlobalVisualStudio10Generator( - genName, "Itanium", "CMAKE_FORCE_IA64"); + genName, "Itanium"); } return 0; } @@ -90,10 +90,8 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory() //---------------------------------------------------------------------------- cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( - const std::string& name, const std::string& platformName, - const std::string& additionalPlatformDefinition) - : cmGlobalVisualStudio8Generator(name, platformName, - additionalPlatformDefinition) + const std::string& name, const std::string& platformName) + : cmGlobalVisualStudio8Generator(name, platformName) { std::string vc10Express; this->ExpressEdition = cmSystemTools::ReadRegistryValue( diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index b4dcc7e..107b646 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -25,8 +25,7 @@ class cmGlobalVisualStudio10Generator : { public: cmGlobalVisualStudio10Generator(const std::string& name, - const std::string& platformName, - const std::string& additionalPlatformDefinition); + const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); virtual bool MatchesGeneratorName(const std::string& name) const; diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index fa134fc..0bd51ea 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -46,19 +46,19 @@ public: if(!*p) { return new cmGlobalVisualStudio11Generator( - genName, "", ""); + genName, ""); } if(*p++ != ' ') { return 0; } if(strcmp(p, "Win64") == 0) { return new cmGlobalVisualStudio11Generator( - genName, "x64", "CMAKE_FORCE_WIN64"); + genName, "x64"); } if(strcmp(p, "ARM") == 0) { return new cmGlobalVisualStudio11Generator( - genName, "ARM", ""); + genName, "ARM"); } std::set<std::string> installedSDKs = @@ -70,7 +70,7 @@ public: } cmGlobalVisualStudio11Generator* ret = - new cmGlobalVisualStudio11Generator(name, p, NULL); + new cmGlobalVisualStudio11Generator(name, p); ret->WindowsCEVersion = "8.00"; return ret; } @@ -105,10 +105,8 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory() //---------------------------------------------------------------------------- cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator( - const std::string& name, const std::string& platformName, - const std::string& additionalPlatformDefinition) - : cmGlobalVisualStudio10Generator(name, platformName, - additionalPlatformDefinition) + const std::string& name, const std::string& platformName) + : cmGlobalVisualStudio10Generator(name, platformName) { std::string vc11Express; this->ExpressEdition = cmSystemTools::ReadRegistryValue( diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 48ea489..3d89a94 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -21,8 +21,7 @@ class cmGlobalVisualStudio11Generator: { public: cmGlobalVisualStudio11Generator(const std::string& name, - const std::string& platformName, - const std::string& additionalPlatformDefinition); + const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); virtual bool MatchesGeneratorName(const std::string& name) const; diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 698624d..47c43fa 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -46,19 +46,19 @@ public: if(!*p) { return new cmGlobalVisualStudio12Generator( - genName, "", ""); + genName, ""); } if(*p++ != ' ') { return 0; } if(strcmp(p, "Win64") == 0) { return new cmGlobalVisualStudio12Generator( - genName, "x64", "CMAKE_FORCE_WIN64"); + genName, "x64"); } if(strcmp(p, "ARM") == 0) { return new cmGlobalVisualStudio12Generator( - genName, "ARM", ""); + genName, "ARM"); } return 0; } @@ -85,10 +85,8 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory() //---------------------------------------------------------------------------- cmGlobalVisualStudio12Generator::cmGlobalVisualStudio12Generator( - const std::string& name, const std::string& platformName, - const std::string& additionalPlatformDefinition) - : cmGlobalVisualStudio11Generator(name, platformName, - additionalPlatformDefinition) + const std::string& name, const std::string& platformName) + : cmGlobalVisualStudio11Generator(name, platformName) { std::string vc12Express; this->ExpressEdition = cmSystemTools::ReadRegistryValue( diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 4557f28..8ac2d1d 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -21,8 +21,7 @@ class cmGlobalVisualStudio12Generator: { public: cmGlobalVisualStudio12Generator(const std::string& name, - const std::string& platformName, - const std::string& additionalPlatformDefinition); + const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); virtual bool MatchesGeneratorName(const std::string& name) const; diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index 9bde0ad..076b057 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -31,19 +31,19 @@ public: if(!*p) { return new cmGlobalVisualStudio14Generator( - genName, "", ""); + genName, ""); } if(*p++ != ' ') { return 0; } if(strcmp(p, "Win64") == 0) { return new cmGlobalVisualStudio14Generator( - genName, "x64", "CMAKE_FORCE_WIN64"); + genName, "x64"); } if(strcmp(p, "ARM") == 0) { return new cmGlobalVisualStudio14Generator( - genName, "ARM", ""); + genName, "ARM"); } return 0; } @@ -70,10 +70,8 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio14Generator::NewFactory() //---------------------------------------------------------------------------- cmGlobalVisualStudio14Generator::cmGlobalVisualStudio14Generator( - const std::string& name, const std::string& platformName, - const std::string& additionalPlatformDefinition) - : cmGlobalVisualStudio12Generator(name, platformName, - additionalPlatformDefinition) + const std::string& name, const std::string& platformName) + : cmGlobalVisualStudio12Generator(name, platformName) { std::string vc14Express; this->ExpressEdition = cmSystemTools::ReadRegistryValue( diff --git a/Source/cmGlobalVisualStudio14Generator.h b/Source/cmGlobalVisualStudio14Generator.h index 7074119..3fd60a0 100644 --- a/Source/cmGlobalVisualStudio14Generator.h +++ b/Source/cmGlobalVisualStudio14Generator.h @@ -21,8 +21,7 @@ class cmGlobalVisualStudio14Generator: { public: cmGlobalVisualStudio14Generator(const std::string& name, - const std::string& platformName, - const std::string& additionalPlatformDefinition); + const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); virtual bool MatchesGeneratorName(const std::string& name) const; diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index 7397bbb..455a7a2 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -41,7 +41,6 @@ void cmGlobalVisualStudio6Generator cmMakefile *mf, bool optional) { - cmGlobalVisualStudioGenerator::AddPlatformDefinitions(mf); mf->AddDefinition("CMAKE_GENERATOR_RC", "rc"); mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); this->GenerateConfigurations(mf); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index a918d1d..759e81e 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -262,7 +262,14 @@ cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator() //---------------------------------------------------------------------------- void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf) { - cmGlobalVisualStudioGenerator::AddPlatformDefinitions(mf); + if(this->PlatformName == "x64") + { + mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); + } + else if(this->PlatformName == "Itanium") + { + mf->AddDefinition("CMAKE_FORCE_IA64", "TRUE"); + } mf->AddDefinition("CMAKE_VS_PLATFORM_NAME", this->GetPlatformName().c_str()); mf->AddDefinition("CMAKE_VS_INTEL_Fortran_PROJECT_VERSION", this->GetIntelProjectVersion()); diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index e6672a8..67583de 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -36,7 +36,7 @@ public: if(p[0] == '\0') { return new cmGlobalVisualStudio8Generator( - name, "", ""); + name, ""); } if(p[0] != ' ') @@ -49,7 +49,7 @@ public: if(!strcmp(p, "Win64")) { return new cmGlobalVisualStudio8Generator( - name, "x64", "CMAKE_FORCE_WIN64"); + name, "x64"); } cmVisualStudioWCEPlatformParser parser(p); @@ -60,7 +60,7 @@ public: } cmGlobalVisualStudio8Generator* ret = new cmGlobalVisualStudio8Generator( - name, p, ""); + name, p); ret->WindowsCEVersion = parser.GetOSVersion(); return ret; } @@ -93,17 +93,11 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory() //---------------------------------------------------------------------------- cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator( - const std::string& name, const std::string& platformName, - const std::string& additionalPlatformDefinition) + const std::string& name, const std::string& platformName) : cmGlobalVisualStudio71Generator(platformName) { this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms"; this->Name = name; - - if (!additionalPlatformDefinition.empty()) - { - this->AdditionalPlatformDefinition = additionalPlatformDefinition; - } } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 2459c05..07bccee 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -24,8 +24,7 @@ class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator { public: cmGlobalVisualStudio8Generator(const std::string& name, - const std::string& platformName, - const std::string& additionalPlatformDefinition); + const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); ///! Get the name for the generator. diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx index c0051c7..45608e1 100644 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -34,7 +34,7 @@ public: if(p[0] == '\0') { return new cmGlobalVisualStudio9Generator( - name, "", ""); + name, ""); } if(p[0] != ' ') @@ -47,13 +47,13 @@ public: if(!strcmp(p, "IA64")) { return new cmGlobalVisualStudio9Generator( - name, "Itanium", "CMAKE_FORCE_IA64"); + name, "Itanium"); } if(!strcmp(p, "Win64")) { return new cmGlobalVisualStudio9Generator( - name, "x64", "CMAKE_FORCE_WIN64"); + name, "x64"); } cmVisualStudioWCEPlatformParser parser(p); @@ -64,7 +64,7 @@ public: } cmGlobalVisualStudio9Generator* ret = new cmGlobalVisualStudio9Generator( - name, p, NULL); + name, p); ret->WindowsCEVersion = parser.GetOSVersion(); return ret; } @@ -98,10 +98,8 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory() //---------------------------------------------------------------------------- cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator( - const std::string& name, const std::string& platformName, - const std::string& additionalPlatformDefinition) - : cmGlobalVisualStudio8Generator(name, platformName, - additionalPlatformDefinition) + const std::string& name, const std::string& platformName) + : cmGlobalVisualStudio8Generator(name, platformName) { } diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h index fb87bbe..f1c7091 100644 --- a/Source/cmGlobalVisualStudio9Generator.h +++ b/Source/cmGlobalVisualStudio9Generator.h @@ -25,8 +25,7 @@ class cmGlobalVisualStudio9Generator : { public: cmGlobalVisualStudio9Generator(const std::string& name, - const std::string& platformName, - const std::string& additionalPlatformDefinition); + const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); ///! create the correct local generator diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index c5a0e29..2dab23c 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -23,7 +23,6 @@ //---------------------------------------------------------------------------- cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator() { - this->AdditionalPlatformDefinition = ""; } //---------------------------------------------------------------------------- @@ -478,15 +477,6 @@ void cmGlobalVisualStudioGenerator::FindMakeProgram(cmMakefile* mf) } //---------------------------------------------------------------------------- -void cmGlobalVisualStudioGenerator::AddPlatformDefinitions(cmMakefile* mf) -{ - if(!this->AdditionalPlatformDefinition.empty()) - { - mf->AddDefinition(this->AdditionalPlatformDefinition, "TRUE"); - } -} - -//---------------------------------------------------------------------------- std::string cmGlobalVisualStudioGenerator::GetUtilityDepend(cmTarget const* target) { diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 1ab8990..05dbb11 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -97,8 +97,6 @@ protected: virtual const char* GetIDEVersion() = 0; - virtual void AddPlatformDefinitions(cmMakefile* mf); - virtual bool ComputeTargetDepends(); class VSDependSet: public std::set<std::string> {}; class VSDependMap: public std::map<cmTarget const*, VSDependSet> {}; @@ -111,7 +109,6 @@ protected: std::string GetUtilityDepend(cmTarget const* target); typedef std::map<cmTarget const*, std::string> UtilityDependsMap; UtilityDependsMap UtilityDepends; - std::string AdditionalPlatformDefinition; private: virtual std::string GetVSMakeProgram() = 0; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ecb34faaaba841aac6dae722dd2c6256a1472d74 commit ecb34faaaba841aac6dae722dd2c6256a1472d74 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 17 15:05:17 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 17 16:01:41 2014 -0400 Tell generators about CMAKE_SYSTEM_NAME as soon as it is known Add a cmGlobalGenerator::SetSystemName virtual method. Call it from cmGlobalGenerator::EnableLanguage as soon as CMAKE_SYSTEM_NAME is known. This will give generators a chance to adapt themselves to the target system. Pass the cmMakefile instance to the method so that the generator can update it accordingly. Return early from EnableLanguage if SetSystemName returns false. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 36932aa..6d737b1 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -448,6 +448,14 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages, mf->ReadListFile(0,fpath.c_str()); } + // Tell the generator about the target system. + std::string system = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME"); + if(!this->SetSystemName(system, mf)) + { + cmSystemTools::SetFatalErrorOccured(); + return; + } + // Tell the generator about the toolset, if any. std::string toolset = mf->GetSafeDefinition("CMAKE_GENERATOR_TOOLSET"); if(!toolset.empty() && diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 5e6c03e..ee3f269 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -61,6 +61,10 @@ public: virtual bool MatchesGeneratorName(const std::string& name) const { return this->GetName() == name; } + /** Tell the generator about the target system. */ + virtual bool SetSystemName(std::string const&, cmMakefile*) + { return true; } + /** Set the generator-specific toolset name. Returns true if toolset is supported and false otherwise. */ virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf); ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.cxx | 8 +++++++ Source/cmGlobalGenerator.h | 4 ++++ Source/cmGlobalVisualStudio10Generator.cxx | 32 +++++++++++++--------------- Source/cmGlobalVisualStudio10Generator.h | 6 ++---- Source/cmGlobalVisualStudio11Generator.cxx | 14 ++++++------ Source/cmGlobalVisualStudio11Generator.h | 3 +-- Source/cmGlobalVisualStudio12Generator.cxx | 12 +++++------ Source/cmGlobalVisualStudio12Generator.h | 3 +-- Source/cmGlobalVisualStudio14Generator.cxx | 12 +++++------ Source/cmGlobalVisualStudio14Generator.h | 3 +-- Source/cmGlobalVisualStudio6Generator.cxx | 1 - Source/cmGlobalVisualStudio7Generator.cxx | 14 +++++++++--- Source/cmGlobalVisualStudio7Generator.h | 2 +- Source/cmGlobalVisualStudio8Generator.cxx | 25 +++++++++++----------- Source/cmGlobalVisualStudio8Generator.h | 5 +++-- Source/cmGlobalVisualStudio9Generator.cxx | 22 ++++++------------- Source/cmGlobalVisualStudio9Generator.h | 5 +---- Source/cmGlobalVisualStudioGenerator.cxx | 10 --------- Source/cmGlobalVisualStudioGenerator.h | 3 --- 19 files changed, 83 insertions(+), 101 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits