From 7a80710d93ee0f4e0d335d65984ae747e62c0337 Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Wed, 10 Jul 2024 14:40:53 +0300 Subject: [PATCH] msvc : silence codecvt c++17 deprecation warnings (#8395) --- common/common.cpp | 4 ++++ src/unicode.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/common/common.cpp b/common/common.cpp index fc0f3b350ec6e..1e5fc30dd458a 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1,3 +1,7 @@ +#if defined(_MSC_VER) +#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING +#endif + #include "common.h" // Change JSON_ASSERT from assert() to GGML_ASSERT: #define JSON_ASSERT GGML_ASSERT diff --git a/src/unicode.cpp b/src/unicode.cpp index 51daa15afa669..e05fb9d1775dd 100644 --- a/src/unicode.cpp +++ b/src/unicode.cpp @@ -1,3 +1,7 @@ +#if defined(_MSC_VER) +#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING +#endif + #include "unicode.h" #include "unicode-data.h"