Re: [CMake] Different targets for different configurations

2012-03-23 Thread Eric Noulard
2012/3/23 Mike Krus m...@mve.com: Hi I would like run a script with different options for debug and release builds. I can do this easily for Makefiles but am struggling to get it to work for Visual Studio. I basically: - add a custom command the output of which depends on the configuration

Re: [CMake] Different targets for different configurations

2012-03-23 Thread Mike Krus
On 23/03/2012 06:53, Eric Noulard wrote: Why can't you use the PRE_BUILD options of add_custom_command with TARGET target signature? It is not possible because this script should be run before any target? I was looking at using targets do make sure the script only once and did so before any

Re: [CMake] Different targets for different configurations

2012-03-23 Thread Mike Krus
On 23/03/2012 09:10, Mike Krus wrote: Technically, that command could run when CMake is invoked (ie before any build invocation). In that case, if the generator is Visual Studio, I would simple run the script twice, once with parameters compatible for debug, once for release... Is there a way to

Re: [CMake] Different targets for different configurations

2012-03-23 Thread Petr Kmoch
Also, this: http://public.kitware.com/Bug/view.php?id=12877 and especially this: http://public.kitware.com/Bug/view.php?id=9974 The latter one even has a patch attached - maybe it could be merged? On Fri, Mar 23, 2012 at 10:33 AM, Mike Krus m...@mve.com wrote: On 23/03/2012 09:10, Mike Krus

[CMake] Different targets for different configurations

2012-03-22 Thread Mike Krus
Hi I would like run a script with different options for debug and release builds. I can do this easily for Makefiles but am struggling to get it to work for Visual Studio. I basically: - add a custom command the output of which depends on the configuration - add a custom target for that