1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-25 12:10:03 +00:00

Use libc++ by default when building with clang.

This commit is contained in:
Brenden Matthews 2022-12-27 08:29:32 -05:00 committed by Brenden Matthews
parent a0b526278a
commit 218a8fd930

View File

@ -71,11 +71,13 @@ if(MAINTAINER_MODE)
FORCE) FORCE)
endif() endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(USING_CLANG true) set(USING_CLANG true)
add_compile_options($<$<COMPILE_LANG_AND_ID:CXX,Clang>:-stdlib=libc++>) endif()
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) endif(MAINTAINER_MODE)
option(CHECK_CODE_QUALITY "Check code formatting/quality with clang" false) option(CHECK_CODE_QUALITY "Check code formatting/quality with clang" false)