[CMake] add_custom_command as target

2008-01-17 Thread Gonzalo Garramuño
Cmake provides add_custom_target, but that creates a target that gets run either always (ALL) or manually by running make target. Cmake also provides an add_custom_command that tracks file dependencies and gets run when a dependency changes. However, add_custom_command assumes the files

Re: [CMake] add_custom_command as target

2008-01-17 Thread Brandon Van Every
On Jan 17, 2008 5:10 AM, Gonzalo Garramuño [EMAIL PROTECTED] wrote: Is there a way to create an add_custom_target that tracks dependencies? Or an add_custom_command that will act as a target (without needlessly being added to add_executable, etc). To get the effect of that, you wrap your

Re: [CMake] add_custom_command as target

2008-01-17 Thread Gonzalo Garramuño
Brandon Van Every wrote: Admittedly this is inelegant, but it works. I have no idea how much work it would be to remove the distinction between file level and target level dependencies. It isn't inelegant, but quite logical. It probably should be kept as is, as it allows easily adding

Re: [CMake] add_custom_command as target

2008-01-17 Thread Brandon Van Every
On Jan 17, 2008 7:46 AM, Gonzalo Garramuño [EMAIL PROTECTED] wrote: That feature is, however, undocumented. Neither of the add_custom_* nor the wiki has any mention of this or the possibility of add_custom_target being able to take a custom command. Not true. add_custom_target says,