On 2017-04-13, Stuart Henderson <s...@spacehopper.org> wrote:

> If it's for c++11 support you could use
>
> MODULES=      gcc4
> MODGCC4_ARCHS=        ${GCC3_ARCHS} ${GCC4_ARCHS}
> MODGCC4_LANGS=        c++
>
> I've been trying to think of a nice abstraction so we don't need to
> copy that boilerplate all over the place. Perhaps a USE_CXX11 flag?

FreeBSD has this approach, probably overengineered:

https://svnweb.freebsd.org/ports/head/Mk/Uses/compiler.mk?revision=430441&view=markup

# Feature:      compiler
# Usage:        USES=compiler or USES=compiler:ARGS
# Valid ARGS:   env (default, implicit) c++0x c++11-lib c++11-lang c11 openmp 
nestedfct features
#
# c++0x:        The port needs a compiler understanding C++0X
# c++11-lang:   The port needs a compiler understanding C++11
# c++14-lang:   The port needs a compiler understanding C++14
# gcc-c++11-lib:The port needs g++ compiler with a C++11 library
# c++11-lib:    The port needs a compiler understanding C++11 and with a
C++11 ready standard library
# c11:          The port needs a compiler understanding C11
# openmp:       The port needs a compiler understanding openmp
# nestedfct:    The port needs a compiler understanding nested functions
# features:     The port will determine the features supported by the default 
compiler
[...]

-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to