Merge topic 'wince-archfam'

0b15ffc MSVC: Fix WinCE arch family preprocessor symbol (#14436)
This commit is contained in:
Brad King 2013-09-26 08:51:36 -04:00 committed by CMake Topic Stage
commit 71c0eb9cd8
1 changed files with 11 additions and 4 deletions

View File

@ -124,8 +124,15 @@ endif()
set(CMAKE_BUILD_TYPE_INIT Debug) set(CMAKE_BUILD_TYPE_INIT Debug)
if(WINCE) if(WINCE)
string(TOUPPER "${MSVC_C_ARCHITECTURE_ID}" _MSVC_C_ARCHITECTURE_ID_UPPER) foreach(lang C CXX)
string(TOUPPER "${MSVC_CXX_ARCHITECTURE_ID}" _MSVC_CXX_ARCHITECTURE_ID_UPPER) 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]+)") if("${CMAKE_SYSTEM_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)")
math(EXPR _CE_VERSION "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}") math(EXPR _CE_VERSION "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}")
@ -136,8 +143,8 @@ if(WINCE)
endif() endif()
set(_PLATFORM_DEFINES "/D_WIN32_WCE=0x${_CE_VERSION} /DUNDER_CE") 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_C " /D${_MSVC_C_ARCHITECTURE_FAMILY} /D_${_MSVC_C_ARCHITECTURE_FAMILY_UPPER}_")
set(_PLATFORM_DEFINES_CXX " /D${MSVC_CXX_ARCHITECTURE_ID} /D_${_MSVC_CXX_ARCHITECTURE_ID_UPPER}_") set(_PLATFORM_DEFINES_CXX " /D${_MSVC_CXX_ARCHITECTURE_FAMILY} /D_${_MSVC_CXX_ARCHITECTURE_FAMILY_UPPER}_")
set(_RTC1 "") set(_RTC1 "")
set(_FLAGS_CXX " /GR /EHsc") set(_FLAGS_CXX " /GR /EHsc")