diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index d9881f2e1..7036ba0bd 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -124,8 +124,15 @@ endif() set(CMAKE_BUILD_TYPE_INIT Debug) if(WINCE) - string(TOUPPER "${MSVC_C_ARCHITECTURE_ID}" _MSVC_C_ARCHITECTURE_ID_UPPER) - string(TOUPPER "${MSVC_CXX_ARCHITECTURE_ID}" _MSVC_CXX_ARCHITECTURE_ID_UPPER) + foreach(lang C CXX) + set(_MSVC_${lang}_ARCHITECTURE_FAMILY "${MSVC_${lang}_ARCHITECTURE_ID}") + if(_MSVC_${lang}_ARCHITECTURE_FAMILY STREQUAL "THUMB") + set(_MSVC_${lang}_ARCHITECTURE_FAMILY "ARM") + elseif(_MSVC_${lang}_ARCHITECTURE_FAMILY MATCHES "^SH") + set(_MSVC_${lang}_ARCHITECTURE_FAMILY "SHx") + endif() + string(TOUPPER "${_MSVC_${lang}_ARCHITECTURE_FAMILY}" _MSVC_${lang}_ARCHITECTURE_FAMILY_UPPER) + endforeach() if("${CMAKE_SYSTEM_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)") math(EXPR _CE_VERSION "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}") @@ -136,8 +143,8 @@ if(WINCE) endif() set(_PLATFORM_DEFINES "/D_WIN32_WCE=0x${_CE_VERSION} /DUNDER_CE") - set(_PLATFORM_DEFINES_C " /D${MSVC_C_ARCHITECTURE_ID} /D_${_MSVC_C_ARCHITECTURE_ID_UPPER}_") - set(_PLATFORM_DEFINES_CXX " /D${MSVC_CXX_ARCHITECTURE_ID} /D_${_MSVC_CXX_ARCHITECTURE_ID_UPPER}_") + set(_PLATFORM_DEFINES_C " /D${_MSVC_C_ARCHITECTURE_FAMILY} /D_${_MSVC_C_ARCHITECTURE_FAMILY_UPPER}_") + set(_PLATFORM_DEFINES_CXX " /D${_MSVC_CXX_ARCHITECTURE_FAMILY} /D_${_MSVC_CXX_ARCHITECTURE_FAMILY_UPPER}_") set(_RTC1 "") set(_FLAGS_CXX " /GR /EHsc")