Fix Mac demos project compile errors on clang 15

Add "-Wno-deprecated-declarations"

util/test/demos/3rdparty/fmt/core.h:378:30: error: 'char_traits<fmt::internal::char8_type>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it. [-Werror,-Wdeprecated-declarations]
      : data_(s), size_(std::char_traits<Char>::length(s)) {}
                             ^
util/test/demos/3rdparty/fmt/format.h:580:9: note: in instantiation of member function 'fmt::basic_string_view<fmt::internal::char8_type>::basic_string_view' requested here
      : basic_string_view<internal::char8_type>(
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__string/char_traits.h:79:8: note: 'char_traits<fmt::internal::char8_type>' has been explicitly marked deprecated here
struct _LIBCPP_DEPRECATED_("char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it.")
This commit is contained in:
Jake Turner
2024-01-27 12:06:41 +00:00
parent adb6fe2e8d
commit 018434e7de
+1 -1
View File
@@ -235,7 +235,7 @@ if(APPLE)
apple/apple_window.cpp
apple/apple_window.h)
add_executable(demos ${SRC} ${VULKAN_SRC})
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wno-deprecated-declarations")
elseif(BUILD_ANDROID)
string(REPLACE "\\" "/" GLUE_SOURCE "${ANDROID_NDK_ROOT_PATH}/sources/android/native_app_glue/android_native_app_glue.c")
include_directories(${ANDROID_NDK_ROOT_PATH}/sources/android/native_app_glue)