Re: [CMake] Configuration environment variable for VS

2009-05-18 Thread James Bigler
I discovered at least for a custom command that ${CMAKE_CFG_INTDIR} expanded to $(OutDir) not $(IntDir). Interestingly enough $(OutDir) was "Debug" and $(IntDir) was "project.dir/Debug". At any rate, I think what I wanted was this: # Figure out which configure we will use and pass that in as a

Re: [CMake] Configuration environment variable for VS

2009-05-15 Thread David Cole
If you use "${CMAKE_CFG_INTDIR}" in a custom command it should show up as $(Config) in the generated VS vcproj files... Does this do what you want? add_custom_command(${OUTPUT_FILE} COMMAND ${CMAKE_COMMAND} ARGS -DCONFIG:STRING=${CMAKE_CFG_INTDIR} -P "${my_custom_script}" ) For makefile based

Re: [CMake] Configuration environment variable for VS

2009-05-14 Thread Dmitry Bely
On Fri, May 15, 2009 at 1:59 AM, James Bigler wrote: > Is there a configuration environment variable for VS that I could use to > change the behavior of an add_custom_command based on whether I'm building a > debug or release build? > > I want something like this: > > add_custom_command(${OUTPUT_F

[CMake] Configuration environment variable for VS

2009-05-14 Thread James Bigler
Is there a configuration environment variable for VS that I could use to change the behavior of an add_custom_command based on whether I'm building a debug or release build? I want something like this: add_custom_command(${OUTPUT_FILE} COMMAND ${CMAKE_COMMAND} ARGS "$(Config)" -P "${my_custom_s