diff options
author | Alexander Boczar <boczar@hotmail.com> | 2019-09-26 17:37:47 -0700 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-10-17 10:18:52 -0400 |
commit | 45b4b4b93076e16281ecee628ef8ffb0aae8f3d6 (patch) | |
tree | bebd105bd72f115307e141627cc7e45cb8a8b0a1 /Modules | |
parent | 548e9051a4f20657d04341107924171ea9d1bcb5 (diff) | |
download | cmake-45b4b4b93076e16281ecee628ef8ffb0aae8f3d6.tar.gz |
VS: Propagate CMAKE_VS_GLOBALS into compiler id projects
Issue: #19708
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 6 | ||||
-rw-r--r-- | Modules/CompilerId/VS-10.vcxproj.in | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 976b291220..f7ef755aeb 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) diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index a3814dc0e5..b48a3323f9 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -16,6 +16,7 @@ @id_WindowsSDKDesktopARMSupport@ @id_CudaToolkitCustomDir@ @id_ToolsetVCTargetsDir@ + @id_CustomGlobals@ </PropertyGroup> @id_toolset_version_props@ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |