standard way to require c++11?

Michael Dickens michaelld at macports.org
Thu Mar 19 09:04:19 PDT 2015


I have a few ports that have recently moved to requiring c++11 (or,
maybe, c++0x), and a few to-be-submitted ports that do too, so I'm
wondering if there's a standard way to specify this requirement -- for
example, something like:
{{{
PortGroup           compilers 1.0
compilers.setup  require_cxx11
}}}
and, then port "does the right thing" by selecting the compiler and
cxxflags no matter the OS.

I did a quick search through the dports tree, and couldn't come up with
a single standard way to do this. The closest I found was something
like:
{{{
    PortGroup compiler_blacklist_versions 1.0
    compiler.blacklist-append *gcc-4.0 *gcc-4.2 {clang < 300}
}}}
but, the above does not work on my 10.8 install.



More information about the macports-dev mailing list