Hi,

> >   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:

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).

Best regards,
  Jens
--

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