View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011213CMakeCMakepublic2010-09-07 11:362012-04-02 10:10
ReporterRandy Schott 
Assigned ToDavid Cole 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.7Fixed in VersionCMake 2.8.7 
Summary0011213: VC2010 Generator handles CMAKE_MFC_FLAG incorrectly
DescriptionI noticed this issue when moving some of our projects to VS2010/Cmake 2.8.2. In previous versions (and the VC 2008 generator), the CMAKE_MFC_FLAG specified how MFC was used. This is mapped as follows:
0 - not using MFC
1 - using MFC statically
2 - using MFC dynamically

I've noticed that the VC2010 generator simply checks for the existence of the CMAKE_MFC_FLAG variable, and writes out "true" or "false", ignoring the actual value of the flag (I've verified this by looking at the source). While this allows me to disable use of MFC by not defining the flag, it does not allow me to specify how mfc should be used.
  I believe the correct values in VC2010 are "false", "static", and "dynamic". The CMAKE_MFC_FLAG values should map to these strings. In fact, it might even make sense to have the CMAKE_MFC_FLAG use the values "false", "static", and "dynamic" itself, instead of the unclear numbering system found in previous versions of VC projects.
TagsNo tags attached.
Attached Filesdiff file icon vc10_mfc_flag.diff [^] (1,329 bytes) 2010-09-07 16:07 [Show Content]

 Relationships
related to 0011224closedDavid Cole Visual-Studo-2010 cannot interpret set (CMAKE_MFC_FLAG 2) => unable to compile project 
related to 0011638closedKitware Robot ATL support 

  Notes
(0022109)
Bill Hoffman (manager)
2010-09-07 12:46

Can you create a patch?
(0022115)
Randy Schott (reporter)
2010-09-07 16:18

I submitted a patch. Bear with me, it's the first time I've ever submitted one (and the first time I've ever used git). The attached patch should restore the usage of 0/1/2 and also accept "false", "static", and "dynamic".
(0024322)
David Cole (manager)
2010-12-22 09:46

Here's another case where a lack of a test is a contributing factor to the bug going unobserved by CMake developers.

If there were a test that built an MFC project, then the test would fail on Visual Studio 2010 dashboard submissions.
(0027723)
David Cole (manager)
2011-11-04 13:44

Fix pushed to 'next':

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=011694c269a1193ec8f7fe8dce8d4a86bcafa8e4 [^]
(0027724)
David Cole (manager)
2011-11-04 13:45

Note also, the MFC test was added and patched up to work on all the dashboard machines in all the commits leading up to this fix commit...
(0029038)
David Cole (manager)
2012-04-02 10:10

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

 Issue History
Date Modified Username Field Change
2010-09-07 11:36 Randy Schott New Issue
2010-09-07 12:46 Bill Hoffman Note Added: 0022109
2010-09-07 16:07 Randy Schott File Added: vc10_mfc_flag.diff
2010-09-07 16:18 Randy Schott Note Added: 0022115
2010-12-22 09:40 David Cole Relationship added related to 0011224
2010-12-22 09:42 David Cole Relationship added related to 0011638
2010-12-22 09:46 David Cole Note Added: 0024322
2010-12-22 09:47 David Cole Assigned To => David Cole
2010-12-22 09:47 David Cole Status new => assigned
2011-10-21 12:21 David Cole Target Version => CMake 2.8.7
2011-11-04 13:44 David Cole Note Added: 0027723
2011-11-04 13:44 David Cole Status assigned => resolved
2011-11-04 13:44 David Cole Fixed in Version => CMake 2.8.7
2011-11-04 13:44 David Cole Resolution open => fixed
2011-11-04 13:45 David Cole Note Added: 0027724
2012-04-02 10:10 David Cole Note Added: 0029038
2012-04-02 10:10 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team