From 4674594ee755d445ab46ef2a945fde5567c5fa57 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 15 May 2012 19:30:17 -0600 Subject: [PATCH] Make libcxx a default option when using clang --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17ea7b3..d448095 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()