From 24543509c1cbec834f463229d204d21494831359 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 29 Jul 2021 20:03:04 +0400 Subject: [PATCH] Use libc++ with clang --- options_linux.cmake | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/options_linux.cmake b/options_linux.cmake index 570f10f..73ce72a 100644 --- a/options_linux.cmake +++ b/options_linux.cmake @@ -74,9 +74,24 @@ if (DESKTOP_APP_USE_ALLOCATION_TRACER) endif() if (NOT DESKTOP_APP_USE_PACKAGED) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + target_link_options(common_options + INTERFACE + -static-libstdc++ + ) + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + target_link_static_libraries(common_options + INTERFACE + c++ + c++abi + ) + target_link_options(common_options + INTERFACE + -nostdlib++ + ) + endif() target_link_options(common_options INTERFACE - -static-libstdc++ -pthread -rdynamic )