111 | | # when using libc++, require Clang 3.4 or newer; Clang 3.3 produces |
112 | | # bad stream reading code. See also MP ticket #44129: |
113 | | # < https://trac.macports.org/ticket/44129 > |
114 | | |
115 | | if {${configure.cxx_stdlib} eq "libc++"} { |
116 | | compiler.blacklist-append *gcc* {clang < 500} macports-clang-3.3 |
| 114 | # On Lion, Clang 3.3 produces bad stream reading code when using libc++. |
| 115 | # See https://trac.macports.org/ticket/44129 |
| 116 | # Clang 3.4 works. But Clang 3.7 doesn't work. |
| 117 | if {${os.platform} eq "darwin" && ${os.major} == 11 && ${configure.cxx_stdlib} eq "libc++"} { |
| 118 | compiler.whitelist macports-clang-3.4 |
130 | | # CMake 3.2 changed dependency requirements to include jsoncpp. |
131 | | # jsoncpp 1.0+ requires CMake for building. catch 22. So, have CMake |
132 | | # use its internal jsoncpp until a better solution comes about. |
| 134 | # jsoncpp 1.0+ requires CMake for building; circular dependencies are |
| 135 | # not possible in MacPorts. In addition, jsoncpp uses C++, so it would |
| 136 | # not be possible for CMake, which uses libc++ on 10.6-10.8, to link |
| 137 | # with a MacPorts copy of jsoncpp, which would usually use libstdc++ |
| 138 | # on those systems. Fortunately CMake comes bundled with its own |
| 139 | # internal copy of jsoncpp, so we use that. |
234 | | |
235 | | # when building the GUI with Qt, CMake uses C++11. So, make sure |
236 | | # the compiler used is c++11 compliant. |
237 | | |
238 | | if {${configure.cxx_stdlib} eq "libstdc++"} { |
239 | | |
240 | | # *clang* when using libstdc++ do not seem to support C++11; |
241 | | # C++11 support seems to need GCC 4.7+ when using libstdc++; |
242 | | # could use C++0x support on GCC4.[56], but just ignore it since |
243 | | # there are newer compilers already in place as defaults. |
244 | | |
245 | | # Blacklist GCC compilers not supporting C++11 and all CLANG. |
246 | | # This is probably not necessary, but it's good practice. |
247 | | |
248 | | compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]} |
249 | | |
250 | | # and whitelist those we do want to use. wish there were a better way. |
251 | | # these will be used in the order provided. |
252 | | |
253 | | compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7 |
254 | | |
255 | | } else { |
256 | | |
257 | | # using libc++; |
258 | | # Blacklist Clang not supporting C++11 in some form and all GCC. |
259 | | # Just use the cxx11 PortGroup for this specific case. |
260 | | |
261 | | PortGroup cxx11 1.0 |
262 | | |
263 | | } |