Make libcxx a default option when using clang

This commit is contained in:
Jason Turner
2012-05-15 19:30:17 -06:00
parent 1f4900c363
commit 4674594ee7

View File

@@ -67,9 +67,15 @@ else()
endif()
if (CMAKE_CXX_COMPILER MATCHES ".*clang")
message(STATUS "Using clang's libcxx")
add_definitions(-stdlib=libc++)
set (EXTRA_LINKER_FLAGS -std=c++0x -stdlib=libc++)
option(USE_LIBCXX "Use clang's libcxx" TRUE)
if (USE_LIBCXX)
add_definitions(-stdlib=libc++)
set (EXTRA_LINKER_FLAGS -std=c++0x -stdlib=libc++)
else ()
set (EXTRA_LINKER_FLAGS -std=c++0x )
endif()
else()
set (EXTRA_LINKER_FLAGS )
endif()