SPAM-LOW: RE: SPAM-LOW: Re: [CMake] Renaming output of EXECUTABLE

William A. Hoffman billlist at nycap.rr.com
Thu Dec 1 14:18:39 EST 2005


At 01:05 PM 12/1/2005, Reggie Burnett wrote:
>Bill
>
>I guess I was confused.  I thought that with Cmake acting as a sort of
>preprocessor, I can get it to output what I needed.  Sort of like this (in
>pseudo cmake )
>
>IF BUILDA
>   SET (EXENAME, "myprog-a")
>ELSE
>   SET (EXENAME, "myprog-b")
>ENDIF
>
>ADD_EXECUTABLE(EXENAME, SRCS)
>
>I thought that when cmake ran, if BUILDA was true in the props that my
>visual projects that were generated would have a project named myprog-a.  If
>it was not true, then the project would be named myprog-b. Is this not so?

This is true, but the problem is that when cmake is run on a project, you
get a .vcproj file with multiple build configurations.  So, given your example, 
if you run cmake and BUILDA is set you would get this file:

myprog-a.vcproj 

It would produce an executable called myprog-a.
However, it would have configurations called Release and Debug inside it,
that would be able to build a release or debug version of myprog-a.  

-Bill



More information about the CMake mailing list