View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014088CMakeModulespublic2013-04-15 10:432014-03-05 09:58
ReporterJan Hudec 
Assigned ToPatrick R. Gansterer 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in VersionCMake 2.8.12 
Summary0014088: WinCE Visual Studio generators emit incorrect project if /ENTRY option is changed
DescriptionI have wmain defined in some CE projects and therefore use /ENTRY:mainWCRTStartup option. But in currentl nightly it generates invalid project with two instances of the `EntryPointSymbol` option.
Steps To ReproduceSet `/ENTRY` option and generate project with any Visual Studio 9 2008 Windows CE generator.
Additional InformationThe code in http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2118a2016f69f3c7cdb711eaaa2f6ca9374103ce [^] needs to check that the `EntryPointSymbol` attribute was already written by the base class.
TagsNo tags attached.
Attached Filesdiff file icon patch-14088.diff [^] (810 bytes) 2013-04-15 11:09 [Show Content]
diff file icon patch-14088-2.diff [^] (2,617 bytes) 2013-04-16 04:14 [Show Content]

 Relationships
related to 0007919closedBrad King Patch for Windows Platform files to add WinCE support with NMake 
related to 0014420closedPatrick R. Gansterer testCCompiler failed under WinCE with linker error 

  Notes
(0032837)
Jan Hudec (reporter)
2013-04-15 10:44

Related to 0007919 which introduces the code in question.
(0032843)
Jan Hudec (reporter)
2013-04-15 11:09

A quick fix is to just ask the options object whether it knows about EntryPointSymbol before emitting it (quickly tested, works for me, patch attached). I would consider it nicer to reorder the code and set the flag into the options object instead though.
(0032844)
Patrick R. Gansterer (developer)
2013-04-15 11:20

1) Thanks for testing the WinCE stuff!
2) Thanks for the patch.

The "main problem" is, that the non-WinCE code does not need a EntryPointSymbol and is detected during linking. I'll try to find a nicer solution, but I don't think that the attached patch is that bad. ;-)
(0032848)
Jan Hudec (reporter)
2013-04-16 03:31

I don't think the patch was bad either. I just feared the growing chain of ifs makes it easier to miss things.
(0032849)
Jan Hudec (reporter)
2013-04-16 03:46
edited on: 2013-04-16 03:53

Hm, one more thing. The generator is able to translate `/D_UNICODE` to `CharacterSet="1"` option, which than affects the default EntryPointSymbol. The code needs to look at that option too. And it does not have to set `EntryPointSymbol` when building WIN32 executable, because WinMain/wWinMain are correctly defaulted.

(0032850)
Jan Hudec (reporter)
2013-04-16 04:15

Attached another patch (made against clean master, not the first one) that takes CharacterSet into account. The EntryPointSymbol is only emitted for "console" applications, the default is appropriate for "windows" ones.
(0033670)
Patrick R. Gansterer (developer)
2013-08-05 15:29

I've pushed a solution at http://cmake.org/gitweb?p=stage/cmake.git;h=refs/heads/wince-entrypoint. [^]
(0033672)
Patrick R. Gansterer (developer)
2013-08-06 17:22

Merged into master: http://cmake.org/gitweb?p=cmake.git;a=commit;h=a3b86cf7117661d9b93d9ab10d5120c3bf6ccac4 [^]
(0035264)
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-04-15 10:43 Jan Hudec New Issue
2013-04-15 10:44 Jan Hudec Note Added: 0032837
2013-04-15 10:55 Brad King Relationship added related to 0007919
2013-04-15 10:55 Brad King Assigned To => Patrick R. Gansterer
2013-04-15 10:55 Brad King Status new => assigned
2013-04-15 11:09 Jan Hudec Note Added: 0032843
2013-04-15 11:09 Jan Hudec File Added: patch-14088.diff
2013-04-15 11:20 Patrick R. Gansterer Note Added: 0032844
2013-04-16 03:31 Jan Hudec Note Added: 0032848
2013-04-16 03:46 Jan Hudec Note Added: 0032849
2013-04-16 03:53 Jan Hudec Note Edited: 0032849
2013-04-16 04:14 Jan Hudec File Added: patch-14088-2.diff
2013-04-16 04:15 Jan Hudec Note Added: 0032850
2013-08-05 15:29 Patrick R. Gansterer Note Added: 0033670
2013-08-06 17:22 Patrick R. Gansterer Note Added: 0033672
2013-08-06 17:22 Patrick R. Gansterer Status assigned => resolved
2013-08-06 17:22 Patrick R. Gansterer Resolution open => fixed
2013-08-06 17:22 Patrick R. Gansterer Fixed in Version => CMake 2.8.12
2013-09-23 09:06 Brad King Relationship added related to 0014420
2014-03-05 09:58 Robert Maynard Note Added: 0035264
2014-03-05 09:58 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team