View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014436CMakeCMakepublic2013-09-24 10:212014-03-05 09:58
Reportermar-na 
Assigned ToPatrick R. Gansterer 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionCMake 2.8.12Fixed in VersionCMake 2.8.12 
Summary0014436: Missing ARCHFAM preprocessor definition in WinCE Visual Studio generators (armv41)
DescriptionI 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.
Steps To ReproduceUse "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\"

Additional InformationIf 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_)
TagsNo tags attached.
Attached Filespatch file icon 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-for-A.patch [^] (2,429 bytes) 2013-09-24 11:45 [Show Content]
patch file icon 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-14436.patch [^] (2,549 bytes) 2013-09-24 11:53 [Show Content]

 Relationships
related to 0014420closedPatrick R. Gansterer testCCompiler failed under WinCE with linker error 
related to 0014083closedPatrick R. Gansterer WinCE generators should not default to THUMB for ARMV4 SDKs 
related to 0014440closedPatrick R. Gansterer Could not generated VS project file for WinCE sh4 

  Notes
(0033876)
mar-na (reporter)
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 (reporter)
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 (manager)
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 (manager)
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 (manager)
2013-09-24 11:54

Better patch, still untested: 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-14436.patch
(0033883)
Brad King (manager)
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 (reporter)
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 (manager)
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 (manager)
2014-03-05 09:58

Closing resolved issues that have not been updated in more than 4 months

 Issue History
Date Modified Username Field Change
2013-09-24 10:21 mar-na New Issue
2013-09-24 10:24 mar-na Note Added: 0033876
2013-09-24 10:27 mar-na Note Added: 0033877
2013-09-24 10:40 Brad King Assigned To => Patrick R. Gansterer
2013-09-24 10:40 Brad King Status new => assigned
2013-09-24 10:43 Brad King Relationship added related to 0014420
2013-09-24 10:53 Brad King Target Version => CMake 2.8.12
2013-09-24 11:17 Brad King Note Added: 0033880
2013-09-24 11:19 Brad King Relationship added related to 0014083
2013-09-24 11:33 Brad King Note Added: 0033881
2013-09-24 11:45 Brad King File Added: 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-for-A.patch
2013-09-24 11:47 Brad King Note Edited: 0033881
2013-09-24 11:53 Brad King File Added: 0001-MSVC-Fix-WinCE-arch-family-preprocessor-symbol-14436.patch
2013-09-24 11:54 Brad King Note Added: 0033882
2013-09-24 17:24 Brad King Note Added: 0033883
2013-09-25 07:40 mar-na Note Added: 0033887
2013-09-25 08:14 Brad King Relationship added related to 0014440
2013-09-25 08:28 Brad King Note Added: 0033890
2013-09-25 08:28 Brad King Status assigned => resolved
2013-09-25 08:28 Brad King Resolution open => fixed
2013-09-25 08:28 Brad King Fixed in Version => CMake 2.8.12
2014-03-05 09:58 Robert Maynard Note Added: 0035267
2014-03-05 09:58 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team