diff options
author | Alexander Boczar <boczar@hotmail.com> | 2019-09-27 00:37:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-10-17 14:18:52 (GMT) |
commit | 45b4b4b93076e16281ecee628ef8ffb0aae8f3d6 (patch) | |
tree | bebd105bd72f115307e141627cc7e45cb8a8b0a1 /Modules/CMakeDetermineCompilerId.cmake | |
parent | 548e9051a4f20657d04341107924171ea9d1bcb5 (diff) | |
download | CMake-45b4b4b93076e16281ecee628ef8ffb0aae8f3d6.zip CMake-45b4b4b93076e16281ecee628ef8ffb0aae8f3d6.tar.gz CMake-45b4b4b93076e16281ecee628ef8ffb0aae8f3d6.tar.bz2 |
VS: Propagate CMAKE_VS_GLOBALS into compiler id projects
Issue: #19708
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 976b291..f7ef755 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -320,6 +320,12 @@ 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() + set(id_CustomGlobals "") + foreach(pair IN LISTS CMAKE_VS_GLOBALS) + if("${pair}" MATCHES "([^=]+)=(.*)$") + string(APPEND id_CustomGlobals "<${CMAKE_MATCH_1}>${CMAKE_MATCH_2}</${CMAKE_MATCH_1}>\n ") + endif() + endforeach() if(id_platform STREQUAL ARM64) set(id_WindowsSDKDesktopARMSupport "<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>") elseif(id_platform STREQUAL ARM) |