diff --git a/CMakeLists.txt b/CMakeLists.txt index f6cc003c17..f61c809abe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -305,10 +305,9 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin") # Set -fno-objc-exceptions, for consistency with -fno-exceptions earlier. # If we set only -fno-exceptions, fmt fails to compile when included from # Objective-C++ because fmt tries try to use throw because __EXCEPTIONS is defined. - # - # TODO: Only enable this for Objective-C(++). - # We get warnings if we enable this when building regular C(++) code. - check_and_add_flag(NO_OBJC_EXCEPTIONS -fno-objc-exceptions) + add_compile_options("$<$:-fno-objc-exceptions>") + add_compile_options("$<$:-fno-objc-exceptions>") + dolphin_compile_definitions(FMT_EXCEPTIONS=0) find_library(APPKIT_LIBRARY AppKit) find_library(APPSERV_LIBRARY ApplicationServices)