fix: -fobjc-arc with GCC (#5632)

This commit is contained in:
Cœur 2023-07-30 03:57:43 +02:00 committed by Charles Kerr
parent 98f112c6bc
commit 03ffe42ad4
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ check_symbol_exists(SO_REUSEPORT "sys/types.h;sys/socket.h" HAVE_SO_REUSEPORT)
add_compile_options(
# equivalent of XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES for this directory
$<$<AND:$<BOOL:${APPLE}>,$<COMPILE_LANGUAGE:C,CXX>>:-fobjc-arc>)
$<$<AND:$<BOOL:${APPLE}>,$<CXX_COMPILER_ID:AppleClang,Clang>,$<COMPILE_LANGUAGE:C,CXX>>:-fobjc-arc>)
add_library(${TR_NAME} STATIC)
@ -201,10 +201,10 @@ tr_allow_compile_if(
watchdir-inotify.cc
[=[[WITH_KQUEUE]]=]
watchdir-kqueue.cc
[=[[APPLE]]=]
[=[[APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang"]]=]
tr-assert.mm
utils.mm
[=[[NOT APPLE]]=]
[=[[NOT (APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")]]=]
tr-assert.cc
[=[[WIN32]]=]
file-win32.cc

View File

@ -287,7 +287,7 @@ double tr_getRatio(uint64_t numerator, uint64_t denominator)
// ---
#ifndef __APPLE__
#if !(defined(__APPLE__) && defined(__clang__))
std::string tr_strv_convert_utf8(std::string_view sv)
{