[Insight-users] Basic cmake question

Gib Bogle g.bogle at auckland.ac.nz
Tue Apr 19 18:46:26 EDT 2011


This is a bit OT, I'm sorry.  I find the cmake documentation very hard to 
follow, because it assumes that you know what you're doing and doesn't deign to 
provide examples.  I simply want to add to cmakefiles.txt an instruction to copy 
the executable created to another directory.  I gather that I want to use 
ADD_CUSTOM_COMMAND, and naively I thought this might do it:

ADD_CUSTOM_COMMAND( TARGET fubar POST_BUILD COMMAND copy fubar.exe 
somepath/fubar.exe)

but although this doesn't trigger a cmake error, it doesn't do anything either, 
and doesn't even seem to change Makefile.  Can someone point me in the right 
direction?

Thanks
Gib


More information about the Insight-users mailing list