Skip to content

Commit

Permalink
cmake: blacklist clang < 3.4 for libc++
Browse files Browse the repository at this point in the history
CMake fails to compile with clang < 3.4 against libc++
due to a compiler bug. Blacklist old clang compilers.

See: https://cmake.org/Bug/view.php?id=15039
Closes: https://trac.macports.org/ticket/44129
  • Loading branch information
mojca committed Feb 9, 2017
1 parent d311a69 commit 9eb9d7b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions devel/cmake/Portfile
Expand Up @@ -2,6 +2,7 @@

PortSystem 1.0
PortGroup muniversal 1.0
PortGroup compiler_blacklist_versions 1.0

name cmake

Expand Down Expand Up @@ -105,6 +106,14 @@ configure.env-append \
CMAKE_INCLUDE_PATH=${prefix}/include/ncurses \
CMAKE_LIBRARY_PATH=${prefix}/lib

# when using libc++, require Clang 3.4 or newer; Clang 3.3 produces
# bad stream reading code. See also MP ticket #44129:
# < https://trac.macports.org/ticket/44129 >

if {${configure.cxx_stdlib} eq "libc++"} {
compiler.blacklist-append *gcc* {clang < 500} macports-clang-3.3
}

platform darwin {
configure.env-append \
CMAKE_OSX_DEPLOYMENT_TARGET="${macosx_deployment_target}"
Expand Down

0 comments on commit 9eb9d7b

Please sign in to comment.