ADD_CUSTOM_COMMAND and *multiple* DEPENDS Was: [CMake] Reexecute
cmake to update build.make
Mathieu Malaterre
mathieu.malaterre at gmail.com
Fri Jun 8 12:29:21 EDT 2007
On 6/8/07, Brandon Van Every <bvanevery at gmail.com> wrote:
> On 6/8/07, Mathieu Malaterre <mathieu.malaterre at gmail.com> wrote:
> > Ok,
> >
> > I finally found out what was the issue. I cannot believe no one has
> > had the issue in the past, as it seems like a pretty easy mistake to
> > do:
> >
> > SET(deps foo.h bla.h)
> > SEPARATE_ARGUMENTS(deps) # very very important !
> > ADD_CUSTOM_COMMAND(
> > OUTPUT ...
> > COMMAND ...
> > DEPENDS ${deps}
> > )
> >
> > that fixes all my previous problems. I cannot believe I did not realize
> > my deps were separated by a ';' ... I really need new glasses
>
> Huh? There is no need for special argument processing for a ${deps}
> list in the code snippet you've given. My code is filled with such
> lists. Unless your dependency data itself has semicolons in it, which
> would indeed cause trouble. Very strange filenames if they've got
> semicolons. Perhaps an extraction from a path or a list that's not
> working properly? Your SEPARATE_ARGUMENTS sounds like a band-aid on a
> problem further up your pipeline.
Actually you are right. For some reason I used double quotes thinking
that cmake might complain when ${deps} is emtpy. But it is not...
Sorry for the noise,
-Mathieu
More information about the CMake
mailing list