pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USE_CXX_FEATURES



On Thu, Sep 21, 2023 at 11:33:47AM +0200, Paolo Vincenzo Olivo wrote:
> > but we still need a
> > 
> >   USE_LANGUAGES=	c++17
> > to actually apply the -std=c++17 flag so it get used?
> 
> If the package doesn't append `-std=c++17' to CFLAGS on its own, but
> requires it... yes this will allow it to build.
> However, forcing a specific C/C++ standard through USE_LANGUAGES is
> now deprecated in pkgsrc (and will likely become unsupported in future).
> The proper way to do this in pkgsrc-trunk is:
> 
> FORCE_CXX_STD=  c++17

Thanks! The reason libpqxx doesn't append -stdc++17 is that it will
happily use c++20 features if one used -stdc++20 instead, so leaves
it up to the user to apply the appropriate flag for the compiler.
Here we might as well stick to the minimum 17 requirement as per
your fix.

Cheers,

Patrick


Home | Main Index | Thread Index | Old Index