View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012566CMakeCMakepublic2011-11-09 19:412016-06-10 14:31
ReporterGili 
Assigned ToKitware Robot 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformPCOSWindowsOS Version7
Product VersionCMake 2.8.6 
Target VersionFixed in Version 
Summary0012566: REGRESSION: CMake suppresses /SUBSYSTEM linker flag
DescriptionSome users wish to use the console subsystem for debug builds and windows subsystem for release builds. http://www.cmake.org/Wiki/VSConfigSpecificSettings [^] provides a solution that used to work but seems to have gotten broken in recent releases.

http://public.kitware.com/Bug/view.php?id=11171 [^] contains a patch that fixes this bug (by reversing the order in which manual linker flags and WIN32_EXECUTABLE are processed). Please apply https://public.kitware.com/Bug/file/3459/Bug-0011171-sub-topic-SUBSYSTEM-WINDOWS-linker-flag.patch [^]
Steps To Reproduce1. Paste http://www.cmake.org/Wiki/VSConfigSpecificSettings [^] into CMakeFiles.txt
2. Build project under Visual Studio 2010 debug and release builds
3. Notice how the /SUBSYSTEM linker flag is being ignored
Additional InformationIdeally we should be able to set SUBSYSTEM directly instead of specifying LINK_FLAGS that show up under "Additional Options". Please consider fixing this separately as an feature request. Again, though, users should be able to configure different SUBSYSTEMS for different configurations (debug/release/etc).
TagsNo tags attached.
Attached Files

 Relationships
related to 0011171closedBill Hoffman Visual Studio 10 solution generation is incorrect 

  Notes
(0027815)
Brad King (manager)
2011-11-17 16:08

The goal is to be able to have per-config values for WIN32_EXECUTABLE. We should just offer that:

  add_executable(foo WIN32 foo.c)
  set_property(TARGET foo PROPERTY WIN32_EXECUTABLE_DEBUG 0)
(0029713)
sd-dm (reporter)
2012-06-18 04:12

Workaround: Add the following lines to your application source:

#ifdef _DEBUG
#pragma comment(linker, "/SUBSYSTEM:CONSOLE")
#endif

Microsoft states that this is not supported (http://msdn.microsoft.com/en-us/library/7f0aews7.aspx [^]) but it perfectly works for our projects.
(0031672)
David Cole (manager)
2012-11-21 15:44

Un-assigning bugs that are not on the active roadmap, which no developers are actively working on for the CMake 2.8.11 release.

If one gets put back on the roadmap, re-assign it appropriately at that time.
(0031675)
David Cole (manager)
2012-11-21 15:45

Re-setting status back to "new" for bugs that are "assigned" but not assigned to a specific developer. When/if these bugs go back on the roadmap for a specific version, assignment to an appropriate developer should take place then...
(0041929)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2011-11-09 19:41 Gili New Issue
2011-11-10 11:10 David Cole Relationship added related to 0011171
2011-11-17 16:07 Brad King Assigned To => David Cole
2011-11-17 16:07 Brad King Status new => assigned
2011-11-17 16:08 Brad King Note Added: 0027815
2012-06-18 04:12 sd-dm Note Added: 0029713
2012-11-21 15:44 David Cole Note Added: 0031672
2012-11-21 15:45 David Cole Note Added: 0031675
2012-11-21 15:45 David Cole Assigned To David Cole =>
2012-11-21 15:45 David Cole Status assigned => new
2016-06-10 14:28 Kitware Robot Note Added: 0041929
2016-06-10 14:28 Kitware Robot Status new => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:28 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team