Hi,

I'd like to suppress the console, but only in release builds. What's the 
official way to do that?

add_executable(... win32 ...) doesn't work, because it switches off the console 
in debug builds.

When I set LINKER_FLAGS_RELEASE to "/subsystem:windows", I can suppress the console in the release builds. However, the Properties window in VS2010 still displays "Console (/SUBSYSTEM:CONSOLE)" in the linker settings, and has two entries in the command line: "/SUBSYSTEM:CONSOLE" and "/subsystem:windows". Only the latter seems to count.

When I set LINKER_FLAGS_RELEASE to "/SUBSYSTEM:WINDOWS", CMake just drops it, and only retains "/SUBSYSTEM:CONSOLE" in the linker flags.

It seems to me that CMake recognizes "/SUBSYSTEM:WINDOWS", but chooses to ignore it for some reason. The fact that "/subsystem:windows" works the way it does seems like a bug. So what's the proper way to achieve what I want?

I'm using CMake 2.8.7 on Win 7 with VS2010.

Cheers
Andreas
--

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