summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-11-03 14:31:04 -0400
committerBrad King <brad.king@kitware.com>2021-11-06 06:08:54 -0400
commitf97f8537f371daa073edce34f54743d1f261c022 (patch)
tree30f5e72adfe40f1d2ee6e468878081f62c38627c /Modules/CMakeDetermineCompilerId.cmake
parente40cedddc0bcdd7d0317592a83fde42fd018f72f (diff)
downloadcmake-f97f8537f371daa073edce34f54743d1f261c022.tar.gz
VS: Model a default target framework
Add fields to the VS generator to select a target framework. Migrate the existing default for VS 12 .NET CF for Windows CE. Report the values in `CMAKE_VS_*` variables and use them for the CSharp compiler id project too. Issue: #22849
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index fa283fec14..c62cb7d249 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -421,6 +421,15 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
if(CMAKE_VS_PLATFORM_TOOLSET_VCTARGETS_CUSTOM_DIR)
set(id_ToolsetVCTargetsDir "<VCTargetsPath>${CMAKE_VS_PLATFORM_TOOLSET_VCTARGETS_CUSTOM_DIR}</VCTargetsPath>")
endif()
+ if(CMAKE_VS_TARGET_FRAMEWORK_VERSION)
+ set(id_TargetFrameworkVersion "<TargetFrameworkVersion>${CMAKE_VS_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>")
+ endif()
+ if(CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER)
+ set(id_TargetFrameworkIdentifier "<TargetFrameworkIdentifier>${CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER}</TargetFrameworkIdentifier>")
+ endif()
+ if(CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION)
+ set(id_TargetFrameworkTargetsVersion "<TargetFrameworkTargetsVersion>${CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION}</TargetFrameworkTargetsVersion>")
+ endif()
set(id_CustomGlobals "")
foreach(pair IN LISTS CMAKE_VS_GLOBALS)
if("${pair}" MATCHES "([^=]+)=(.*)$")