diff options
author | Brad King <brad.king@kitware.com> | 2019-05-21 12:46:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-21 12:50:37 (GMT) |
commit | 9c07cefee541d47be9c378a9285711e07be7a16f (patch) | |
tree | 36ca8caaed27ffe89a4a51e3fa4877d1782e3623 /Modules/CMakeDetermineCompilerId.cmake | |
parent | 639e14def6ada307c25a422a4b51f1fceaebeead (diff) | |
download | CMake-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
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 4 |
1 files changed, 2 insertions, 2 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() |