diff options
author | Brad King <brad.king@kitware.com> | 2021-11-03 14:31:04 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-11-06 06:08:54 -0400 |
commit | f97f8537f371daa073edce34f54743d1f261c022 (patch) | |
tree | 30f5e72adfe40f1d2ee6e468878081f62c38627c /Modules/CMakeDetermineCompilerId.cmake | |
parent | e40cedddc0bcdd7d0317592a83fde42fd018f72f (diff) | |
download | cmake-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.cmake | 9 |
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 "([^=]+)=(.*)$") |