[build2] How do you specify several file extensions possible?

Klaim - Joël Lamotte mjklaim at gmail.com
Fri Sep 14 16:34:13 UTC 2018

On Fri, 14 Sep 2018 at 18:30, Boris Kolpackov <boris at codesynthesis.com> wrote:
> > Basically while trying to port some code to build2 I need to be able
> > to express that header extensions can be either hpp, h or inl.
> Are they the same headers or is .hpp for C++ headers, .h for C headers,
> and .inl for C++ inline function implementations? If so, then:
> h{*}:   extension = h
> hxx{*}: extension = hpp
> ipp{*}: extension = inl

OK I thought ixx/ipp was for module related stuffs but that solves the
problem in my use cases at least.

> In fact, in such a project, it may make sense not to rely on
> default extensions at all and instead always specify them
> explicitly to avoid any further confusion:
> exe{hello}: ... hxx{foo.hxx bar.hpp}

Make sense. Usually the extension fields you provided should be enough
but that should work in extremely-weird cases.



More information about the users mailing list