The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14326 
====================================================================== 
Reported By:                Soeren Freudiger
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14326
Category:                   (No Category)
Reproducibility:            always
Severity:                   minor
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2013-07-31 08:02 EDT
Last Modified:              2013-07-31 08:02 EDT
====================================================================== 
Summary:                    VS2012 generator ignores /SUBSYSTEM:WNDOWS
Description: 
We define for all Win and MFC projects the Subystem with "/SUBSYSTEM:WINDOWS".
This works very well for VS2003/2005 and 2008 (2010 we did not try).

But for VS2012 this flag is ignored by cmake. Only at

  add_executable( MY_TARGET WIN32 ${MY_files} )

we obtain the correct flag. 

Otherwise we find 

   /CONSOLE:CONSOLE"5,01

inside the link options...




Steps to Reproduce: 
first we add the link option with:

set_target_properties( MY_TARGET PROPERTIES  LINK_FLAGS_DEBUG
"/SUBSYSTEM:WINDOWS")

then we set
   set(CMAKE_MFC_FLAG 1) http://www.cmake.org/Bug/view.php?id=1 for static the
static MFC library

and 
   add_library( ${project_name}  SHARED ${_files} )



Additional Information: 
the result in the vcxproj is:

<subsystem>console</subsystem>

At VS2008 we have something like:
AdditionalOptions=" /machine:X86 /debug /swaprun:net /LIBPATH:E:/DitecLibs/Lib
nafxcwd.lib /SUBSYSTEM:WINDOWS"

and that works fine.

I think the parser somehow ignores the SUBSYSTEM command. Is that the point?
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-07-31 08:02 Soeren FreudigerNew Issue                                    
======================================================================

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to