[build2] What does these means? exe{*} lib{*}

Boris Kolpackov boris at codesynthesis.com
Tue Sep 18 16:50:47 UTC 2018

Klaim - Joël Lamotte <mjklaim at gmail.com> writes:
> Questions:
>  0. Is this all a bug with name globing of non-file targets?

Yes, naturally, name patterns cannot be used for non-file prerequisites.

>  1. Would it make sense to make globing syntax an error for targets
> that are not file targets?

Yes, I will look into your examples once I am back from CppCon and
we will add the diagnostics.

Also note that

  lib{*}: x = y


  exe{x}: lib{*}

mean very different things. The former is a target type/patter-specific
variable assignment and makes sense for the lib{} target type (i.e. it
has nothing to do with globbing). The latter is a prerequisite name
pattern, which should probably be an error in this case since lib{} is
not file-based.

More information about the users mailing list