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 0df50f497c4c4937e882b6ea7048980e52e855d0 (commit) via 401a00d9f98aff9c2f15315945cd4c392ff36d9f (commit) via 709cebde66a4251e1a1ed7a90c072f06be691bee (commit) via 72395ab23eee5ed7ff5a8800632869d6ef66f805 (commit) via 2074f5813889680d32c784c3dbdb1bf41be1405f (commit) via c72f0887cee6c3c47f50efb44256476045cf801f (commit) via 1c94558abb653968de6da2cb4672006f31ca0d14 (commit) via 592098e2d5a00d396e84d7a5e51ae6c550a21fc6 (commit) via aa42a78f523f3db5e849663a7c55d949dd25bfb0 (commit) via b94ddf6cd70e811e4bc3f3c28ef7195bcf2bb0cf (commit) via d7938bff37bfa05f34b9ad5a46ae3aff54955eea (commit) via 3abd150ce9df03e24a903dedc952339b58ba79cb (commit) via c1580a9217ee2447433c76eca2ad0e6be6347a57 (commit) via 29410df23d4783de9d90a6d8c24cf7c9c5aacc80 (commit) from 4c83a4e74d4e13307504ff681269776ef0878246 (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=0df50f497c4c4937e882b6ea7048980e52e855d0 commit 0df50f497c4c4937e882b6ea7048980e52e855d0 Merge: 4c83a4e 401a00d Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Aug 4 10:31:02 2014 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Aug 4 10:31:02 2014 -0400 Merge topic 'vs-windows-phone-and-store' into next 401a00d9 VS: Set WindowsPhone and WindowsStore min VS version required 709cebde VS: Generate WindowsPhone and WindowsStore application types 72395ab2 VS: Add .sln "Deploy" mark for WindowsPhone and WindowsStore binaries 2074f581 MSVC: Add system libs for WindowsPhone and WindowsStore c72f0887 MSVC: Add default WindowsPhone and WindowsStore compile flags 1c94558a MSVC: Disable incremental linking for WindowsPhone and WindowsStore 592098e2 Define 'WINDOWS_PHONE' and 'WINDOWS_STORE' variables aa42a78f Add WindowsPhone and WindowsStore platform information modules b94ddf6c CMakeDetermineCompilerId: Recognize WindowsPhone and WindowsStore d7938bff VS: Select WindowsPhone and WindowsStore default toolsets 3abd150c VS: Save WindowsPhone and WindowsStore system internally c1580a92 VS: Always add IgnoreSpecificDefaultLibraries to .vcxproj files 29410df2 cmIDEOptions: Add an AppendFlag method to update multi-valued options http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=401a00d9f98aff9c2f15315945cd4c392ff36d9f commit 401a00d9f98aff9c2f15315945cd4c392ff36d9f Author: Gilles Khouzam <gill...@microsoft.com> AuthorDate: Thu Jul 31 13:24:08 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:09:05 2014 -0400 VS: Set WindowsPhone and WindowsStore min VS version required Generate the MinimumVisualStudioVersion element in the .vcxproj file based on the version of WindowsPhone or WindowsStore to be targeted. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index e9421e3..291827a 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2120,5 +2120,17 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() this->WriteString("<ApplicationTypeRevision>", 2); (*this->BuildFileStream) << cmVS10EscapeXML(v) << "</ApplicationTypeRevision>\n"; + if(v == "8.1") + { + // Visual Studio 12.0 is necessary for building 8.1 apps + this->WriteString("<MinimumVisualStudioVersion>12.0" + "</MinimumVisualStudioVersion>\n", 2); + } + else if (v == "8.0") + { + // Visual Studio 11.0 is necessary for building 8.0 apps + this->WriteString("<MinimumVisualStudioVersion>11.0" + "</MinimumVisualStudioVersion>\n", 2); + } } } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=709cebde66a4251e1a1ed7a90c072f06be691bee commit 709cebde66a4251e1a1ed7a90c072f06be691bee Author: Gilles Khouzam <gill...@microsoft.com> AuthorDate: Thu Jul 31 13:22:35 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:09:03 2014 -0400 VS: Generate WindowsPhone and WindowsStore application types Generate the ApplicationType and ApplicationTypeRevision elements in .vcxproj files. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 18d8951..e9421e3 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -286,6 +286,11 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("<ProjectGUID>", 2); (*this->BuildFileStream) << "{" << this->GUID << "}</ProjectGUID>\n"; + if(this->MSTools && this->Target->GetType() <= cmTarget::UTILITY) + { + this->WriteApplicationTypeSettings(); + } + const char* vsProjectTypes = this->Target->GetProperty("VS_GLOBAL_PROJECT_TYPES"); if(vsProjectTypes) @@ -2100,3 +2105,20 @@ bool cmVisualStudio10TargetGenerator:: expectedResxHeaders.find(headerFile); return it != expectedResxHeaders.end(); } + +void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() +{ + bool const isWindowsPhone = this->GlobalGenerator->TargetsWindowsPhone(); + bool const isWindowsStore = this->GlobalGenerator->TargetsWindowsStore(); + std::string const& v = this->GlobalGenerator->GetSystemVersion(); + if(isWindowsPhone || isWindowsStore) + { + this->WriteString("<ApplicationType>", 2); + (*this->BuildFileStream) << (isWindowsPhone ? + "Windows Phone" : "Windows Store") + << "</ApplicationType>\n"; + this->WriteString("<ApplicationTypeRevision>", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(v) + << "</ApplicationTypeRevision>\n"; + } +} diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 7436372..2bbdb8c 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -91,6 +91,7 @@ private: void WriteCustomCommand(cmSourceFile const* sf); void WriteGroups(); void WriteProjectReferences(); + void WriteApplicationTypeSettings(); bool OutputSourceSpecificFlags(cmSourceFile const* source); void AddLibraries(cmComputeLinkInformation& cli, std::vector<std::string>& libVec); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72395ab23eee5ed7ff5a8800632869d6ef66f805 commit 72395ab23eee5ed7ff5a8800632869d6ef66f805 Author: Gilles Khouzam <gill...@microsoft.com> AuthorDate: Tue Jul 29 11:43:19 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:09:01 2014 -0400 VS: Add .sln "Deploy" mark for WindowsPhone and WindowsStore binaries diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 33cfaa1..39bbdc0 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -242,3 +242,17 @@ cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs() return ret; } + +//---------------------------------------------------------------------------- +bool +cmGlobalVisualStudio11Generator::NeedsDeploy(cmTarget::TargetType type) const +{ + if((type == cmTarget::EXECUTABLE || + type == cmTarget::SHARED_LIBRARY) && + (this->SystemIsWindowsPhone || + this->SystemIsWindowsStore)) + { + return true; + } + return cmGlobalVisualStudio10Generator::NeedsDeploy(type); +} diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 0b497db..bbd935c 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -41,6 +41,9 @@ protected: virtual const char* GetIDEVersion() { return "11.0"; } bool UseFolderProperty(); static std::set<std::string> GetInstalledWindowsCESDKs(); + + /** Return true if the configuration needs to be deployed */ + virtual bool NeedsDeploy(cmTarget::TargetType type) const; private: class Factory; friend class Factory; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2074f5813889680d32c784c3dbdb1bf41be1405f commit 2074f5813889680d32c784c3dbdb1bf41be1405f Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 31 13:08:53 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:08:58 2014 -0400 MSVC: Add system libs for WindowsPhone and WindowsStore Use the libraries that are added by default by the VS 2013 IDE for Windows Phone and Windows Store projects. diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 9431e90..9d4aca2 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -165,7 +165,11 @@ if(WINCE) elseif(WINDOWS_PHONE OR WINDOWS_STORE) set(_FLAGS_C " /DUNICODE /D_UNICODE") set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc") - set(CMAKE_C_STANDARD_LIBRARIES_INIT "") + if(WINDOWS_PHONE) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib") + else() + set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib") + endif() else() set(_PLATFORM_DEFINES "/DWIN32") http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c72f0887cee6c3c47f50efb44256476045cf801f commit c72f0887cee6c3c47f50efb44256476045cf801f Author: Paul Annetts <p...@lightunobscured.com> AuthorDate: Mon Jul 28 14:56:13 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:08:56 2014 -0400 MSVC: Add default WindowsPhone and WindowsStore compile flags Also set the list of standard libraries to empty. diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index b0d3e49..9431e90 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -162,6 +162,10 @@ if(WINCE) if (MSVC_VERSION LESS 1600) set(CMAKE_C_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT} corelibc.lib") endif () +elseif(WINDOWS_PHONE OR WINDOWS_STORE) + set(_FLAGS_C " /DUNICODE /D_UNICODE") + set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc") + set(CMAKE_C_STANDARD_LIBRARIES_INIT "") else() set(_PLATFORM_DEFINES "/DWIN32") http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c94558abb653968de6da2cb4672006f31ca0d14 commit 1c94558abb653968de6da2cb4672006f31ca0d14 Author: Gilles Khouzam <gill...@microsoft.com> AuthorDate: Mon Jul 28 14:50:57 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:08:54 2014 -0400 MSVC: Disable incremental linking for WindowsPhone and WindowsStore Do not add a "/INCREMENTAL" flag when using the toolchains for these systems. diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index e51c592..b0d3e49 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -199,10 +199,12 @@ unset(_MACHINE_ARCH_FLAG) # add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype # on versions that support it set( MSVC_INCREMENTAL_YES_FLAG "") -if(NOT MSVC_INCREMENTAL_DEFAULT) - set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES") -else() - set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" ) +if(NOT WINDOWS_PHONE AND NOT WINDOWS_STORE) + if(NOT MSVC_INCREMENTAL_DEFAULT) + set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES") + else() + set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" ) + endif() endif() if (CMAKE_COMPILER_SUPPORTS_PDBTYPE) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=592098e2d5a00d396e84d7a5e51ae6c550a21fc6 commit 592098e2d5a00d396e84d7a5e51ae6c550a21fc6 Author: Gilles Khouzam <gill...@microsoft.com> AuthorDate: Mon Jul 28 14:19:45 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:08:52 2014 -0400 Define 'WINDOWS_PHONE' and 'WINDOWS_STORE' variables Set one of these when CMAKE_SYSTEM_NAME is "WindowsPhone" or "WindowsStore", respectively. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 05a7b33..e622784 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -190,6 +190,8 @@ Variables that Describe the System /variable/MSVC_VERSION /variable/UNIX /variable/WIN32 + /variable/WINDOWS_PHONE + /variable/WINDOWS_STORE /variable/XCODE_VERSION Variables that Control the Build diff --git a/Help/variable/WINDOWS_PHONE.rst b/Help/variable/WINDOWS_PHONE.rst new file mode 100644 index 0000000..61d91b0 --- /dev/null +++ b/Help/variable/WINDOWS_PHONE.rst @@ -0,0 +1,5 @@ +WINDOWS_PHONE +------------- + +True when the :variable:`CMAKE_SYSTEM_NAME` variable is set +to ``WindowsPhone``. diff --git a/Help/variable/WINDOWS_STORE.rst b/Help/variable/WINDOWS_STORE.rst new file mode 100644 index 0000000..dae3b53 --- /dev/null +++ b/Help/variable/WINDOWS_STORE.rst @@ -0,0 +1,5 @@ +WINDOWS_STORE +------------- + +True when the :variable:`CMAKE_SYSTEM_NAME` variable is set +to ``WindowsStore``. diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake index 7e97111..9a937a7 100644 --- a/Modules/Platform/Windows.cmake +++ b/Modules/Platform/Windows.cmake @@ -2,6 +2,10 @@ set(WIN32 1) if(CMAKE_SYSTEM_NAME STREQUAL "WindowsCE") set(WINCE 1) +elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") + set(WINDOWS_PHONE 1) +elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(WINDOWS_STORE 1) endif() set(CMAKE_STATIC_LIBRARY_PREFIX "") http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa42a78f523f3db5e849663a7c55d949dd25bfb0 commit aa42a78f523f3db5e849663a7c55d949dd25bfb0 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Jul 28 14:08:10 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:08:50 2014 -0400 Add WindowsPhone and WindowsStore platform information modules Simply include the "Windows" platform equivalents. This will allow -DCMAKE_SYSTEM_NAME=WindowsPhone or -DCMAKE_SYSTEM_NAME=WindowsStore to select variants of the Windows platform while re-using most of the platform information from "Windows". diff --git a/Modules/Platform/WindowsPhone-MSVC-C.cmake b/Modules/Platform/WindowsPhone-MSVC-C.cmake new file mode 100644 index 0000000..ce8060b --- /dev/null +++ b/Modules/Platform/WindowsPhone-MSVC-C.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-C) diff --git a/Modules/Platform/WindowsPhone-MSVC-CXX.cmake b/Modules/Platform/WindowsPhone-MSVC-CXX.cmake new file mode 100644 index 0000000..281eadc --- /dev/null +++ b/Modules/Platform/WindowsPhone-MSVC-CXX.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-CXX) diff --git a/Modules/Platform/WindowsPhone.cmake b/Modules/Platform/WindowsPhone.cmake new file mode 100644 index 0000000..65b2eae --- /dev/null +++ b/Modules/Platform/WindowsPhone.cmake @@ -0,0 +1 @@ +include(Platform/Windows) diff --git a/Modules/Platform/WindowsStore-MSVC-C.cmake b/Modules/Platform/WindowsStore-MSVC-C.cmake new file mode 100644 index 0000000..ce8060b --- /dev/null +++ b/Modules/Platform/WindowsStore-MSVC-C.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-C) diff --git a/Modules/Platform/WindowsStore-MSVC-CXX.cmake b/Modules/Platform/WindowsStore-MSVC-CXX.cmake new file mode 100644 index 0000000..281eadc --- /dev/null +++ b/Modules/Platform/WindowsStore-MSVC-CXX.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-CXX) diff --git a/Modules/Platform/WindowsStore.cmake b/Modules/Platform/WindowsStore.cmake new file mode 100644 index 0000000..65b2eae --- /dev/null +++ b/Modules/Platform/WindowsStore.cmake @@ -0,0 +1 @@ +include(Platform/Windows) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b94ddf6cd70e811e4bc3f3c28ef7195bcf2bb0cf commit b94ddf6cd70e811e4bc3f3c28ef7195bcf2bb0cf Author: Gilles Khouzam <gill...@microsoft.com> AuthorDate: Mon Jul 28 14:27:59 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:08:48 2014 -0400 CMakeDetermineCompilerId: Recognize WindowsPhone and WindowsStore When CMAKE_SYSTEM_NAME is set to target one of these, add ApplicationType and ApplicationTypeRevision elements to the .vcxproj file used to identify the compiler so that the WindowsPhone or WindowsStore toolchains can work. Co-Author: Brad King <brad.k...@kitware.com> diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 025d296..a780fa6 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -168,6 +168,18 @@ Id flags: ${testflags} else() set(id_toolset "") endif() + if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") + set(id_system "<ApplicationType>Windows Phone</ApplicationType>") + elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(id_system "<ApplicationType>Windows Store</ApplicationType>") + else() + set(id_system "") + endif() + if(id_system AND CMAKE_SYSTEM_VERSION) + set(id_system_version "<ApplicationTypeRevision>${CMAKE_SYSTEM_VERSION}</ApplicationTypeRevision>") + else() + set(id_system_version "") + endif() if(CMAKE_VS_WINCE_VERSION) set(id_entrypoint "mainACRTStartup") if("${vs_version}" VERSION_LESS 9) diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index 1a7a539..bacbca4 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -10,6 +10,8 @@ <ProjectGuid>{CAE07175-D007-4FC3-BFE8-47B392814159}</ProjectGuid> <RootNamespace>CompilerId@id_lang@</RootNamespace> <Keyword>Win32Proj</Keyword> + @id_system@ + @id_system_version@ </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'" Label="Configuration"> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7938bff37bfa05f34b9ad5a46ae3aff54955eea commit d7938bff37bfa05f34b9ad5a46ae3aff54955eea Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Jul 28 16:15:43 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:08:46 2014 -0400 VS: Select WindowsPhone and WindowsStore default toolsets Teach the VS >= 10 generators to recognize these system names and select the appropriate default toolset for the system version. Report an error when the version is not known to be supported by VS. Inspired-by: Gilles Khouzam <gill...@microsoft.com> diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 5189569..c708a08 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -148,20 +148,46 @@ bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s, } //---------------------------------------------------------------------------- -bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile*) +bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf) { if(this->SystemName == "WindowsPhone") { this->SystemIsWindowsPhone = true; + if(!this->InitializeWindowsPhone(mf)) + { + return false; + } } else if(this->SystemName == "WindowsStore") { this->SystemIsWindowsStore = true; + if(!this->InitializeWindowsStore(mf)) + { + return false; + } } return true; } //---------------------------------------------------------------------------- +bool cmGlobalVisualStudio10Generator::InitializeWindowsPhone(cmMakefile* mf) +{ + cmOStringStream e; + e << this->GetName() << " does not support Windows Phone."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; +} + +//---------------------------------------------------------------------------- +bool cmGlobalVisualStudio10Generator::InitializeWindowsStore(cmMakefile* mf) +{ + cmOStringStream e; + e << this->GetName() << " does not support Windows Store."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; +} + +//---------------------------------------------------------------------------- void cmGlobalVisualStudio10Generator ::AddVSPlatformToolsetDefinition(cmMakefile* mf) const { diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index e3156bf..6245b28 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -107,6 +107,10 @@ public: protected: virtual void Generate(); virtual bool InitializeSystem(cmMakefile* mf); + virtual bool InitializeWindowsPhone(cmMakefile* mf); + virtual bool InitializeWindowsStore(cmMakefile* mf); + virtual std::string SelectWindowsPhoneToolset() const { return ""; } + virtual std::string SelectWindowsStoreToolset() const { return ""; } virtual const char* GetIDEVersion() { return "10.0"; } diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index e5a159b..33cfaa1 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -129,6 +129,56 @@ cmGlobalVisualStudio11Generator::MatchesGeneratorName( } //---------------------------------------------------------------------------- +bool cmGlobalVisualStudio11Generator::InitializeWindowsPhone(cmMakefile* mf) +{ + this->DefaultPlatformToolset = this->SelectWindowsPhoneToolset(); + if(this->DefaultPlatformToolset.empty()) + { + cmOStringStream e; + e << this->GetName() << " supports Windows Phone '8.0', but not '" + << this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmGlobalVisualStudio11Generator::InitializeWindowsStore(cmMakefile* mf) +{ + this->DefaultPlatformToolset = this->SelectWindowsStoreToolset(); + if(this->DefaultPlatformToolset.empty()) + { + cmOStringStream e; + e << this->GetName() << " supports Windows Store '8.0', but not '" + << this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio11Generator::SelectWindowsPhoneToolset() const +{ + if(this->SystemVersion == "8.0") + { + return "v110_wp80"; + } + return this->cmGlobalVisualStudio10Generator::SelectWindowsPhoneToolset(); +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio11Generator::SelectWindowsStoreToolset() const +{ + if(this->SystemVersion == "8.0") + { + return "v110"; + } + return this->cmGlobalVisualStudio10Generator::SelectWindowsStoreToolset(); +} + +//---------------------------------------------------------------------------- void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout) { fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 3d89a94..0b497db 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -34,6 +34,10 @@ public: /** TODO: VS 11 user macro support. */ virtual std::string GetUserMacrosDirectory() { return ""; } protected: + virtual bool InitializeWindowsPhone(cmMakefile* mf); + virtual bool InitializeWindowsStore(cmMakefile* mf); + virtual std::string SelectWindowsPhoneToolset() const; + virtual std::string SelectWindowsStoreToolset() const; virtual const char* GetIDEVersion() { return "11.0"; } bool UseFolderProperty(); static std::set<std::string> GetInstalledWindowsCESDKs(); diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 4235cbc..29ecfe0 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -109,6 +109,56 @@ cmGlobalVisualStudio12Generator::MatchesGeneratorName( } //---------------------------------------------------------------------------- +bool cmGlobalVisualStudio12Generator::InitializeWindowsPhone(cmMakefile* mf) +{ + this->DefaultPlatformToolset = this->SelectWindowsPhoneToolset(); + if(this->DefaultPlatformToolset.empty()) + { + cmOStringStream e; + e << this->GetName() << " supports Windows Phone '8.0' and '8.1', " + "but not '" << this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmGlobalVisualStudio12Generator::InitializeWindowsStore(cmMakefile* mf) +{ + this->DefaultPlatformToolset = this->SelectWindowsStoreToolset(); + if(this->DefaultPlatformToolset.empty()) + { + cmOStringStream e; + e << this->GetName() << " supports Windows Store '8.0' and '8.1', " + "but not '" << this->SystemVersion << "'. Check CMAKE_SYSTEM_VERSION."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio12Generator::SelectWindowsPhoneToolset() const +{ + if(this->SystemVersion == "8.1") + { + return "v120_wp81"; + } + return this->cmGlobalVisualStudio11Generator::SelectWindowsPhoneToolset(); +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio12Generator::SelectWindowsStoreToolset() const +{ + if(this->SystemVersion == "8.1") + { + return "v120"; + } + return this->cmGlobalVisualStudio11Generator::SelectWindowsStoreToolset(); +} + +//---------------------------------------------------------------------------- void cmGlobalVisualStudio12Generator::WriteSLNHeader(std::ostream& fout) { fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 8ac2d1d..ec85f10 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -39,6 +39,10 @@ public: //version number virtual const char* GetToolsVersion() { return "12.0"; } protected: + virtual bool InitializeWindowsPhone(cmMakefile* mf); + virtual bool InitializeWindowsStore(cmMakefile* mf); + virtual std::string SelectWindowsPhoneToolset() const; + virtual std::string SelectWindowsStoreToolset() const; virtual const char* GetIDEVersion() { return "12.0"; } private: class Factory; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3abd150ce9df03e24a903dedc952339b58ba79cb commit 3abd150ce9df03e24a903dedc952339b58ba79cb Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Jul 29 11:42:30 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:08:43 2014 -0400 VS: Save WindowsPhone and WindowsStore system internally Add boolean members to the VS >= 10 global generator to save whether CMAKE_SYSTEM_NAME is WindowsPhone or WindowsStore without having to repeat a string comparison. Inspired-by: Gilles Khouzam <gill...@microsoft.com> diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 4007789..5189569 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -97,6 +97,8 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( this->ExpressEdition = cmSystemTools::ReadRegistryValue( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0\\Setup\\VC;" "ProductDir", vc10Express, cmSystemTools::KeyWOW64_32); + this->SystemIsWindowsPhone = false; + this->SystemIsWindowsStore = false; this->MasmEnabled = false; this->MSBuildCommandInitialized = false; } @@ -148,6 +150,14 @@ bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s, //---------------------------------------------------------------------------- bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile*) { + if(this->SystemName == "WindowsPhone") + { + this->SystemIsWindowsPhone = true; + } + else if(this->SystemName == "WindowsStore") + { + this->SystemIsWindowsStore = true; + } return true; } diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index b042559..e3156bf 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -70,6 +70,14 @@ public: /** Return the CMAKE_SYSTEM_VERSION. */ std::string const& GetSystemVersion() const { return this->SystemVersion; } + /** Return true if building for WindowsPhone */ + bool TargetsWindowsPhone() const + { return this->SystemIsWindowsPhone; } + + /** Return true if building for WindowsStore */ + bool TargetsWindowsStore() const + { return this->SystemIsWindowsStore; } + /** * Where does this version of Visual Studio look for macros for the * current user? Returns the empty string if this version of Visual @@ -108,6 +116,8 @@ protected: std::string DefaultPlatformToolset; std::string SystemName; std::string SystemVersion; + bool SystemIsWindowsPhone; + bool SystemIsWindowsStore; bool ExpressEdition; bool MasmEnabled; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c1580a9217ee2447433c76eca2ad0e6be6347a57 commit c1580a9217ee2447433c76eca2ad0e6be6347a57 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 31 14:03:03 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:08:41 2014 -0400 VS: Always add IgnoreSpecificDefaultLibraries to .vcxproj files Append %(IgnoreSpecificDefaultLibraries) to any user-specified libraries so that the system-default list of libraries to ignore is honored even when the user specifies more. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6989d95..18d8951 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1864,6 +1864,8 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) { linkOptions.AddFlag("ModuleDefinitionFile", def.c_str()); } + linkOptions.AppendFlag("IgnoreSpecificDefaultLibraries", + "%(IgnoreSpecificDefaultLibraries)"); } this->LinkOptions[config] = pOptions.release(); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29410df23d4783de9d90a6d8c24cf7c9c5aacc80 commit 29410df23d4783de9d90a6d8c24cf7c9c5aacc80 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 31 14:02:03 2014 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 31 14:08:39 2014 -0400 cmIDEOptions: Add an AppendFlag method to update multi-valued options diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index dfbece7..72bd593 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -196,6 +196,13 @@ void cmIDEOptions::AddFlag(const char* flag, } //---------------------------------------------------------------------------- +void cmIDEOptions::AppendFlag(std::string const& flag, + std::string const& value) +{ + this->FlagMap[flag].push_back(value); +} + +//---------------------------------------------------------------------------- void cmIDEOptions::RemoveFlag(const char* flag) { this->FlagMap.erase(flag); diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index 313c003..9b60f80 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -30,6 +30,7 @@ public: void AddDefines(const std::vector<std::string> &defines); void AddFlag(const char* flag, const char* value); void AddFlag(const char* flag, std::vector<std::string> const& value); + void AppendFlag(std::string const& flag, std::string const& value); void RemoveFlag(const char* flag); const char* GetFlag(const char* flag); ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 2 + Help/variable/WINDOWS_PHONE.rst | 5 ++ Help/variable/WINDOWS_STORE.rst | 5 ++ Modules/CMakeDetermineCompilerId.cmake | 12 ++++ Modules/CompilerId/VS-10.vcxproj.in | 2 + Modules/Platform/Windows-MSVC.cmake | 18 ++++-- Modules/Platform/Windows.cmake | 4 ++ ...wsCE-MSVC-C.cmake => WindowsPhone-MSVC-C.cmake} | 0 ...-MSVC-CXX.cmake => WindowsPhone-MSVC-CXX.cmake} | 0 .../{WindowsCE.cmake => WindowsPhone.cmake} | 0 ...wsCE-MSVC-C.cmake => WindowsStore-MSVC-C.cmake} | 0 ...-MSVC-CXX.cmake => WindowsStore-MSVC-CXX.cmake} | 0 .../{WindowsCE.cmake => WindowsStore.cmake} | 0 Source/cmGlobalVisualStudio10Generator.cxx | 38 +++++++++++- Source/cmGlobalVisualStudio10Generator.h | 14 +++++ Source/cmGlobalVisualStudio11Generator.cxx | 64 ++++++++++++++++++++ Source/cmGlobalVisualStudio11Generator.h | 7 +++ Source/cmGlobalVisualStudio12Generator.cxx | 50 +++++++++++++++ Source/cmGlobalVisualStudio12Generator.h | 4 ++ Source/cmIDEOptions.cxx | 7 +++ Source/cmIDEOptions.h | 1 + Source/cmVisualStudio10TargetGenerator.cxx | 36 +++++++++++ Source/cmVisualStudio10TargetGenerator.h | 1 + 23 files changed, 265 insertions(+), 5 deletions(-) create mode 100644 Help/variable/WINDOWS_PHONE.rst create mode 100644 Help/variable/WINDOWS_STORE.rst copy Modules/Platform/{WindowsCE-MSVC-C.cmake => WindowsPhone-MSVC-C.cmake} (100%) copy Modules/Platform/{WindowsCE-MSVC-CXX.cmake => WindowsPhone-MSVC-CXX.cmake} (100%) copy Modules/Platform/{WindowsCE.cmake => WindowsPhone.cmake} (100%) copy Modules/Platform/{WindowsCE-MSVC-C.cmake => WindowsStore-MSVC-C.cmake} (100%) copy Modules/Platform/{WindowsCE-MSVC-CXX.cmake => WindowsStore-MSVC-CXX.cmake} (100%) copy Modules/Platform/{WindowsCE.cmake => WindowsStore.cmake} (100%) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits