[cmake-developers] [PATCH] Added FILTER subcommand to list command

Brad King brad.king at kitware.com
Tue Jan 19 10:43:08 EST 2016


On 01/16/2016 12:10 PM, Ashley Whetter wrote:
> In response to issue 0003986, I've implemented a FILTER subcommand to the "list"
> command that filters a list using a regular expression.

Nice work.  The change looks good except I'd like to bikeshed the name
of the option.  This is the first list() API that will use a regular
expression as an argument, so I think "REGEX" should appear in the
name, e.g. "FILTER_REGEX".  Also the name should clarify whether the
filter result includes or excludes the matches.  Perhaps

 list(FILTER_REGEX_INCLUDE <list> <regex>)

?  Alternatively the name could still be "FILTER" and there could
be named arguments to control the rest of the details.  I have no
preference but would welcome other opinions.

Thanks,
-Brad



More information about the cmake-developers mailing list