SPAM-LOW: Re: [CMake] Renaming output of EXECUTABLE
Reggie Burnett
reggie at bytefx.com
Thu Dec 1 11:53:12 EST 2005
Bill
But I can switch on a property value that I set to set the exe name and have
it work in Visual or Xcode?
> -----Original Message-----
> From: William A. Hoffman [mailto:billlist at nycap.rr.com]
> Sent: Thursday, December 01, 2005 10:14 AM
> To: darko at uvcms.com; Reggie Burnett
> Cc: cmake at cmake.org
> Subject: SPAM-LOW: Re: [CMake] Renaming output of EXECUTABLE
>
> At 10:55 AM 12/1/2005, Darko Miletic wrote:
> >Reggie Burnett wrote:
> >> Thanks Darko. I'm very new to cmake so even some of the simple things
> >> currently escape me. Can I also use a variable for the target?
> >>
> >> ADD_EXECUTABLE(${EXENAME} ${SRCS})
> >
> >Of course. You can even modify the filename based on some conditions:
> >
> >IF (CMAKE_BUILD_TYPE MATCHES Debug)
> > SET(DBG "_dbg")
> >ELSE (CMAKE_BUILD_TYPE MATCHES Debug)
> > SET(DBG "")
> >ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
> >
> >SET (EXENAME baseexename${DBG})
> >
> >ADD_EXECUTABLE(${EXENAME} ${SRCS})
>
>
> The only problem with this approach is that it will not work with visual
> studio
> or XCode IDE's. Those project types do not use the CMAKE_BUILD_TYPE since
> they have multiple build types in one project anyway.
>
>
> -Bill
More information about the CMake
mailing list