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.

>From what I can gather via testing on my 10.8 install, the clang ports
support "-std=c++11" only when "-stdlib=libc++" -- which is not the
default in MacPorts for 10.8 and prior. I haven't tried moving my ports
install to using libc++, instead leaving it with the default. Hence, it
looks like I'm stuck using GCC.

GCC 4.7+ do provide full support for "-std=c++11", and it looks like GCC
4.[56] provide support for "-std=c++0x" (but, that's old enough now that
I think I can just limit support to actual c++11).

Anyway, wondering how others have provided c++11 support to the variety
of OSs MacPorts supports. Thanks! - MLD
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to