Hi,

I'm using CMAKE 2.8.6 with Visual Studio 2010 Express. According to
http://www.cmake.org/Wiki/VSConfigSpecificSettings I should be able run:

  set_target_properties(main PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")

where "main" is my project, but I've discovered that CMake strips
"/SUBSYSTEM:WINDOWS" silently and never passes it to the linker. By
contrast, if I run:

set_target_properties(main PROPERTIES LINK_FLAGS "/SUBSYSTEM:foo")

  it reaches the linker. I can't simply add WIN32 to add_executable()
because I want debug builds to use the console sub-system and release builds
to use the windows subsystem. I have three questions:

1. Why CMake is stripping this flag?
2. Why is it not issuing a warning of some sort?
3. How do I override SUBSYSTEM as suggested by this Wiki entry?

Thanks,
Gili

--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMake-stripping-SUBSYSTEM-out-of-LINK-FLAGS-tp6980078p6980078.html
Sent from the CMake mailing list archive at Nabble.com.
--

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to