Re: [CMake] adding a custom command with the file name as a target

2011-03-11 Thread Jim Newsome
ello.bin On Fri, Mar 11, 2011 at 2:30 PM, Michael Hertling wrote: > On 03/11/2011 08:00 PM, David Cole wrote: >> On Fri, Mar 11, 2011 at 12:05 PM, Jim Newsome wrote: >>> Unfortunately it seems that the target needs to have a different name >>> from its dependen

Re: [CMake] adding a custom command with the file name as a target

2011-03-11 Thread Jim Newsome
reated with the add_custom_target() > call. So just change yours to: > > add_custom_target(hello.bin ALL DEPENDS hello.bin) > > hth, > tyler > > On Fri, Mar 11, 2011 at 7:58 AM, Jim Newsome wrote: >> I'd like to do something like add_custom_command, with the ou

[CMake] adding a custom command with the file name as a target

2011-03-11 Thread Jim Newsome
I'd like to do something like add_custom_command, with the output file name as a target in the generated makefile. Is there an elegant way of doing this? The closest I've come is: add_executable (hello hello.c) add_custom_command(OUTPUT hello.bin COMMAND objcopy --output-format