Use libc++ by default when building with clang.
This commit is contained in:

committed by
Brenden Matthews

parent
a0b526278a
commit
218a8fd930
@@ -73,9 +73,11 @@ if(MAINTAINER_MODE)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(USING_CLANG true)
|
||||
add_compile_options($<$<COMPILE_LANG_AND_ID:CXX,Clang>:-stdlib=libc++>)
|
||||
add_link_options($<$<COMPILE_LANG_AND_ID:CXX,Clang>:-stdlib=libc++>)
|
||||
endif()
|
||||
|
||||
# Always use libc++ when compiling w/ clang
|
||||
add_compile_options($<$<COMPILE_LANG_AND_ID:CXX,Clang>:-stdlib=libc++>)
|
||||
add_link_options($<$<COMPILE_LANG_AND_ID:CXX,Clang>:"-stdlib=libc++ -lc++abi">)
|
||||
endif(MAINTAINER_MODE)
|
||||
|
||||
option(CHECK_CODE_QUALITY "Check code formatting/quality with clang" false)
|
||||
|
Reference in New Issue
Block a user