1
0
Эх сурвалжийг харах

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.
Sebastian Beckmann 4 сар өмнө
parent
commit
f4bb61f472

+ 4 - 0
cmake/macos/compilerconfig.cmake

@@ -14,6 +14,10 @@ include(compiler_common)
 
 
 add_compile_options("$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:-fopenmp-simd>")
 add_compile_options("$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:-fopenmp-simd>")
 
 
+if(CMAKE_CXX_STANDARD GREATER_EQUAL 20)
+  add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-char8_t>)
+endif()
+
 # Ensure recent enough Xcode and platform SDK
 # Ensure recent enough Xcode and platform SDK
 function(check_sdk_requirements)
 function(check_sdk_requirements)
   set(obs_macos_minimum_sdk 15.0) # Keep in sync with Xcode
   set(obs_macos_minimum_sdk 15.0) # Keep in sync with Xcode