From f4bb61f472e1e99e2f27c4e6a0ca76dcff97515d Mon Sep 17 00:00:00 2001 From: Sebastian Beckmann Date: Sun, 31 Aug 2025 16:40:53 +0200 Subject: [PATCH] cmake: Disable char8_t on macOS with C++20 This is already disabled for other platforms, but the clang options aren't applied on macOS. Amends 8d33da1fab53c362d82b9b2fcdcdb02ba4a3a006. --- cmake/macos/compilerconfig.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/macos/compilerconfig.cmake b/cmake/macos/compilerconfig.cmake index 2e41fba51..83a0a1c10 100644 --- a/cmake/macos/compilerconfig.cmake +++ b/cmake/macos/compilerconfig.cmake @@ -14,6 +14,10 @@ include(compiler_common) add_compile_options("$<$>:-fopenmp-simd>") +if(CMAKE_CXX_STANDARD GREATER_EQUAL 20) + add_compile_options($<$:-fno-char8_t>) +endif() + # Ensure recent enough Xcode and platform SDK function(check_sdk_requirements) set(obs_macos_minimum_sdk 15.0) # Keep in sync with Xcode