[CMake] Retrieving a named argument from a list
Eric NOULARD
eric.noulard at gmail.com
Thu May 8 05:37:48 EDT 2008
Le Wed, 7 May 2008 17:33:54 -0500,
"George Neill" <georgen at neillnet.com> a écrit :
> Alexander,
>
> > > Below is what I have come up with to fetch named arg from a
> > > list. Is there a preferred or built-in way to do this I may
> > > have missed?
> >
> > There is no built-in way, but it would be nice to have one.
> > Maybe some function for LIST() ?
>
> Thanks for confirming this. That'd be nice, maybe LIST(BETWEEN ...)
> or something like that. I suppose i'll just use the macro for now! :)
Just for sake of information when I need such feature
in an home-brewed MACRO I do use the
PARSE_ARGUMENTS macro defined here:
http://www.cmake.org/Wiki/CMakeMacroParseArguments
which relies on LIST_CONTAINS MACRO defined in
http://www.cmake.org/Wiki/CMakeMacroListOperations
those "old" MACROs may be replaced by builtin LIST operation
as shown at the end of the Wiki page.
--
Erk
More information about the CMake
mailing list