summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-21 12:46:41 (GMT)
committerBrad King <brad.king@kitware.com>2019-05-21 12:50:37 (GMT)
commit9c07cefee541d47be9c378a9285711e07be7a16f (patch)
tree36ca8caaed27ffe89a4a51e3fa4877d1782e3623
parent639e14def6ada307c25a422a4b51f1fceaebeead (diff)
downloadCMake-9c07cefee541d47be9c378a9285711e07be7a16f.zip
CMake-9c07cefee541d47be9c378a9285711e07be7a16f.tar.gz
CMake-9c07cefee541d47be9c378a9285711e07be7a16f.tar.bz2
VS: Fix ApplicationTypeRevision in builtin check projects
Do not use the entire `CMAKE_SYSTEM_VERSION`, but rather the first two components only. Fixes: #19275
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake4
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 7036b93..f62672d 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -276,8 +276,8 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
else()
set(id_system "")
endif()
- if(id_system AND CMAKE_SYSTEM_VERSION)
- set(id_system_version "<ApplicationTypeRevision>${CMAKE_SYSTEM_VERSION}</ApplicationTypeRevision>")
+ if(id_system AND CMAKE_SYSTEM_VERSION MATCHES "^([0-9]+\\.[0-9]+)")
+ set(id_system_version "<ApplicationTypeRevision>${CMAKE_MATCH_1}</ApplicationTypeRevision>")
else()
set(id_system_version "")
endif()
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 6a78d0b..55374a4 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -784,11 +784,11 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf)
if (this->GetSystemName() == "WindowsPhone") {
cmXMLElement(epg, "ApplicationType").Content("Windows Phone");
cmXMLElement(epg, "ApplicationTypeRevision")
- .Content(this->GetSystemVersion());
+ .Content(this->GetApplicationTypeRevision());
} else if (this->GetSystemName() == "WindowsStore") {
cmXMLElement(epg, "ApplicationType").Content("Windows Store");
cmXMLElement(epg, "ApplicationTypeRevision")
- .Content(this->GetSystemVersion());
+ .Content(this->GetApplicationTypeRevision());
}
if (!this->WindowsTargetPlatformVersion.empty()) {
cmXMLElement(epg, "WindowsTargetPlatformVersion")