| 31 | post-patch { |
| 32 | reinplace "s/c++0x/c++11/" ${worksrcpath}/CMakeLists.txt |
| 33 | } |
| 34 | |
| 35 | if {${configure.cxx_stdlib} eq "libstdc++"} { |
| 36 | |
| 37 | # *clang* when using libstdc++ do not seem to support C++11; |
| 38 | # C++11 support seems to need GCC 4.7+ when using libstdc++; |
| 39 | # could use C++0x support on GCC4.[56], but just ignore it since |
| 40 | # there are newer compilers already in place as defaults. |
| 41 | |
| 42 | # Blacklist GCC compilers not supporting C++11 and all CLANG. |
| 43 | # This is probably not necessary, but it's good practice. |
| 44 | |
| 45 | compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]} |
| 46 | |
| 47 | # and whitelist GCC compilers that support C++11. wish there were |
| 48 | # a better way. these will be used in the order provided. |
| 49 | |
| 50 | compiler.whitelist macports-gcc-5 macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7 |
| 51 | |
| 52 | } else { |
| 53 | |
| 54 | # using libc++; |
| 55 | # Blacklist Clang not supporting C++11 in some form and all GCC. |
| 56 | # Just use the cxx11 PortGroup for this specific case. |
| 57 | |
| 58 | PortGroup cxx11 1.0 |
| 59 | |
| 60 | } |
| 61 | |