[CMake] Calling macros from within macros.

Josef Karthauser joe.karthauser at geomerics.com
Thu Oct 25 03:58:11 EDT 2007


> -----Original Message-----
> From: cmake-bounces+joe.karthauser=geomerics.com at cmake.org
> [mailto:cmake-bounces+joe.karthauser=geomerics.com at cmake.org] On
Behalf
> Of Brandon Van Every
> Sent: 24 October 2007 18:08
> To: cmake at cmake.org
> Subject: [CMake] Calling macros from within macros.
> 
> On 10/24/07, Alexander Neundorf <a.neundorf-work at gmx.net> wrote:
> > On Wednesday 24 October 2007, Josef Karthauser wrote:
> > > Is it not possible to call a variable macroname from within a
> macro?
> > >
> > >       MACRO(INDIRECT_MACRO MACRONAME LIST)
> > >               FOREACH(L ${LIST})
> > >                       ${MACRONAME}(${L})
> > >               ENDFOREACH(L)
> > >       ENDMACRO(INDIRECT_MACRO)
> > >
> > >       INDIRECT_MACRO(MESSAGE ONE TWO THREE)
> >
> > No, variable function/macronames are not supported. Maybe there is
> already a
> > feature request in the bug tracker for this.
> 
> Variable *variable* names are certainly possible, however, so that
> might help with whatever you were trying to do.

It doesn't :/  I definitely need macro names to do it neatly.  Ho hum,
I'll expand them out literally. :)

Joe


More information about the CMake mailing list