MantisBT - CMake
View Issue Details
0014436CMakeCMakepublic2013-09-24 10:212014-03-05 09:58
mar-na 
Patrick R. Gansterer 
normalmajoralways
closedfixed 
 
CMake 2.8.12CMake 2.8.12 
0014436: Missing ARCHFAM preprocessor definition in WinCE Visual Studio generators (armv41)
I try to compile a HelloWorld console application for WinCE STANDARDSDK_500 (ARMV41) with VS 2008.

In CMake 2.8.11 it works but in 2.8.11.20130923 failed it with strange compiler error:

(compiler log from VS 2008)
Compiling...
HelloWorld.cpp
C:\Programme\Windows CE Tools\wce500\STANDARDSDK_500\include\ARMV4I\winnt.h(2975) : error C2146: syntax error : missing ';' before identifier 'ContextRecord'
C:\Programme\Windows CE Tools\wce500\STANDARDSDK_500\include\ARMV4I\winnt.h(2975) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Programme\Windows CE Tools\wce500\STANDARDSDK_500\include\ARMV4I\winnt.h(2975) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

I compare the generated project files and found that in the CMake trunk are the preprocessor definition for ARCHFAM is missing.
If I manuelle added $(ARCHFAM);$(_ARCHFAM_) or ARM;_ARM_ than it worked.
Use "Visual Studio 9 2008 STANDARDSDK_500 (ARMV41)" generator.
ARCHFAM is missing in preprocessor definition. e.g. for ARMV41 ARM;_ARM_.
Or alternativly (as Visual Studio 'native' do it) $(ARCHFAM);$(_ARCHFAM_)


cmake 2.8.11 STANDARDSDK_500 (ARMV41)
-------------------------------------
_WIN32_WCE=0x500
UNDER_CE
ARM
_ARM_
_WINDOWS
_DEBUG
CMAKE_INTDIR=\"Debug\"

cmake 2.8.11.20130923 STANDARDSDK_500 (ARMV41)
----------------------------------------------

_WIN32_WCE=0x500
UNDER_CE
THUMB
_THUMB_
_WINDOWS
_DEBUG
CMAKE_INTDIR=\"Debug\"

-> is THUMB and _THUMB_ here right? $(ARCHFAM);$(_ARCHFAM_) or ARM;_ARM_ is missing


for comparison only:
If the "Visual Studio 9 2008 STANDARDSDK_500 (x86)" generator is used it works

cmake 2.8.11.20130923 STANDARDSDK_500 (x86)
------------------------

_WIN32_WCE=0x500
UNDER_CE
X86
_X86_
_WINDOWS
_DEBUG
CMAKE_INTDIR=\"Debug\"

If a project is generate with the VS than the preprocessor definition are set to this:

'native' generated with VS 2008
-------------------------------
DEBUG
_WIN32_WCE=$(CEVER)
UNDER_CE
WINCE
DEBUG
_CONSOLE
$(ARCHFAM)
$(_ARCHFAM_)
No tags attached.
related to 0014420closed Patrick R. Gansterer testCCompiler failed under WinCE with linker error 
related to 0014083closed Patrick R. Gansterer WinCE generators should not default to THUMB for ARMV4 SDKs 
related to 0014440closed Patrick R. Gansterer Could not generated VS project file for WinCE sh4 
patch 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-for-A.patch (2,429) 2013-09-24 11:45
https://public.kitware.com/Bug/file/4885/0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-for-A.patch
patch 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-14436.patch (2,549) 2013-09-24 11:53
https://public.kitware.com/Bug/file/4886/0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-14436.patch
Issue History
2013-09-24 10:21mar-naNew Issue
2013-09-24 10:24mar-naNote Added: 0033876
2013-09-24 10:27mar-naNote Added: 0033877
2013-09-24 10:40Brad KingAssigned To => Patrick R. Gansterer
2013-09-24 10:40Brad KingStatusnew => assigned
2013-09-24 10:43Brad KingRelationship addedrelated to 0014420
2013-09-24 10:53Brad KingTarget Version => CMake 2.8.12
2013-09-24 11:17Brad KingNote Added: 0033880
2013-09-24 11:19Brad KingRelationship addedrelated to 0014083
2013-09-24 11:33Brad KingNote Added: 0033881
2013-09-24 11:45Brad KingFile Added: 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-for-A.patch
2013-09-24 11:47Brad KingNote Edited: 0033881bug_revision_view_page.php?bugnote_id=33881#r1263
2013-09-24 11:53Brad KingFile Added: 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-14436.patch
2013-09-24 11:54Brad KingNote Added: 0033882
2013-09-24 17:24Brad KingNote Added: 0033883
2013-09-25 07:40mar-naNote Added: 0033887
2013-09-25 08:14Brad KingRelationship addedrelated to 0014440
2013-09-25 08:28Brad KingNote Added: 0033890
2013-09-25 08:28Brad KingStatusassigned => resolved
2013-09-25 08:28Brad KingResolutionopen => fixed
2013-09-25 08:28Brad KingFixed in Version => CMake 2.8.12
2014-03-05 09:58Robert MaynardNote Added: 0035267
2014-03-05 09:58Robert MaynardStatusresolved => closed

Notes
(0033876)
mar-na   
2013-09-24 10:24   
in build are the project files which are generated with cmake 2.8.11.20130923 and in build_2-8-11 which are generated with cmake 2.8.11
(0033877)
mar-na   
2013-09-24 10:27   
In cmVisualStudioWCEPlatformParser.h is a function cmVisualStudioWCEPlatformParser::GetArchitectureFamily. What do it. Could it used for this? It is currently unused.
(0033880)
Brad King   
2013-09-24 11:17   
This regression was caused by:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd827f98 [^]

because it changes the MSVC_<lang>_ARCHITECTURE_ID to something other than ARM, which influences the definitions generated by the Platform/Windows-MSVC module (_PLATFORM_DEFINES_C, etc.).
(0033881)
Brad King   
2013-09-24 11:33   
(edited on: 2013-09-24 11:47)
Untested patch: 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-for-A.patch

(0033882)
Brad King   
2013-09-24 11:54   
Better patch, still untested: 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-14436.patch
(0033883)
Brad King   
2013-09-24 17:24   
The regression in this issue is the sole blocker of CMake 2.8.12-rc4. Please try out 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-14436.patch ASAP.
(0033887)
mar-na   
2013-09-25 07:40   
Thank you very much for the quick reply. I tested the patch and it works for me.
(0033890)
Brad King   
2013-09-25 08:28   
Patrick applied the patch here:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b15ffc7 [^]

Thanks for testing!
(0035267)
Robert Maynard   
2014-03-05 09:58   
Closing resolved issues that have not been updated in more than 4 months