[CMake] Using Macro function like

Brandon Van Every bvanevery at gmail.com
Mon Dec 3 15:16:29 EST 2007


On Dec 3, 2007 5:57 AM,  <Alexander.Camek at elektrobit.com> wrote:
> Hi,
>
>
> > -----Original Message-----
> > From: cmake-bounces+alexander.camek=elektrobit.com at cmake.org
> > [mailto:cmake-bounces+alexander.camek=elektrobit.com at cmake.org
> > ] On Behalf Of Andreas Pakulat
> > Sent: Monday, December 03, 2007 11:52 AM
> > To: cmake at cmake.org
> > Subject: Re: [CMake] Using Macro function like
> >
> > On 03.12.07 05:47:29, Brandon Van Every wrote:
> > > On Dec 3, 2007 5:41 AM,  <Alexander.Camek at elektrobit.com> wrote:
> > > >
> > > > I invoke the macro by calling it with C2ADA(${LIST_OF_FILES} ADS).
> > > >
> > > > Is there a possibilty to do what I want by using another command?
> > >
> > > You want variable arguments.  Look in the MACRO docs for
> > ARGC, ARGV, and ARGN.
>
> Nope I want to have only two arguments. One for my list and one for the option.

If that's what you want, then you're calling your macro incorrectly.  You want
C2ADA(LIST_OF_FILES ADS)
not
C2ADA(${LIST_OF_FILES} ADS)
in the latter case you have expanded your list into all of its
constituent elements.  That's why I thought you wanted a varargs
interface.


Cheers,
Brandon Van Every


More information about the CMake mailing list