[CMake] VS Project Question
Philip Lowman
philip at yhbt.com
Tue Apr 1 00:39:16 EDT 2008
On Mon, Mar 31, 2008 at 11:24 PM, Surya Kiran Gullapalli <
suryakiran.gullapalli at gmail.com> wrote:
> I want to do similar change for ADD_EXECUTABLE as well.
> > >
> > > For Debug builds I want to have a console popping up to show the debug
> > > messages, and for release builds I do not want the console.
> > >
> > > How can i change the ADD_EXECUTABLE call accordingly to supply extra
> > > option WIN32 based on the build type.?
> >
> >
> > Same limiting issue here. You can build the executable twice for all
> > configurations (one with WIN32, one without) or you can resort to a single
> > build configuration per Visual Studio solution file.
> >
> > For you to get the kind of behavior you want, CMake would have to be
> > modified to run multiple times for each build type in
> > CMAKE_CONFIGURATION_TYPES and then modify the project files accordingly for
> > each configuration type, depending on the CMake commands the user issued.
> > This would be a neat feature request to add but could prove difficult to
> > implement.
> >
>
> Use
>
> SET_TARGET_PROPERTIES ( ${TARGET} PROPERTIES
> LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS"
> LINK_FLAGS_RELEASE "/SUBSYSTEM:CONSOLE"
> LINK_FLAGS "/ENTRY:mainCRTStartup"
> )
>
> In that case, debug executable will be built with a console and release
> one with out console.
>
Great idea!
--
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080401/29277f6d/attachment.htm>
More information about the CMake
mailing list