Re: CMake stripping "/SUBSYSTEM" out of LINK_FLAGS
> > it reaches the linker. I can't simply add WIN32 to
> > because I want debug builds to use the console sub-system
> and release
> > builds to use the windows subsystem. I have three questions:
I don't have a solution in cmake, but I worked around this using code from here: http://www.halcyon.com/~ast/dload/guicon.htm.
It shows how to open a console window and redirect the output. It also has the benefit that the debug build is closer to release builds and that the entry point definition is more in line with the windows documentation (SUBSYSTEM:WINDOWS -> WinMain, SUBSYSTEM:CONSOLE -> main).