Merge pull request #798 from ashemedai/master

Add FreeBSD to the HAS_LIBCXX11 case.
This commit is contained in:
Val Markovic 2014-01-22 12:27:52 -08:00
commit 2f981a25d8

View File

@ -70,8 +70,9 @@ if ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
# Linux machines don't necessarily have libc++ installed alongside clang, # Linux machines don't necessarily have libc++ installed alongside clang,
# but HAS_LIBCXX11 doesn't always trigger for machines that DO have libc++. We # but HAS_LIBCXX11 doesn't always trigger for machines that DO have libc++. We
# know that at least all the Mac OS versions we support that use Clang have # know that at least all the Mac OS versions we support that use Clang have
# libc++, so we're safe there. # libc++, so we're safe there. On FreeBSD 9 libc++ is an optional build
if ( HAS_LIBCXX11 OR APPLE ) # toggle. On FreeBSD 10 it is the default.
if ( HAS_LIBCXX11 OR APPLE OR SYSTEM_IS_FREEBSD )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" )
endif() endif()