From 502e611d14db08cdc89d6bad76c973dd2e211a10 Mon Sep 17 00:00:00 2001 From: admin <964472638@qq.com> Date: Thu, 16 May 2024 09:12:10 +0800 Subject: [PATCH] =?UTF-8?q?zlm=20=E7=BC=96=E8=AF=91=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=BE=93=E5=87=BAutf-8=E5=AD=97=E7=AC=A6=E9=9B=86=EF=BC=8C?= =?UTF-8?q?=E5=92=8C=E5=BC=80=E5=90=AF/Zc:=5F=5Fcplusplus=E9=80=89?= =?UTF-8?q?=E9=A1=B9=EF=BC=88=E9=BB=98=E8=AE=A4c++14=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd0124a9..09c5c0b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# MIT License +# MIT License # # Copyright (c) 2016-2022 The ZLMediaKit project authors. All Rights Reserved. # @@ -201,8 +201,10 @@ if(UNIX) set(COMPILE_OPTIONS_DEFAULT ${COMPILE_OPTIONS_DEFAULT} "-g0") endif() elseif(WIN32) - if (MSVC) - set(COMPILE_OPTIONS_DEFAULT + if (MSVC) + add_compile_options("/utf-8") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus") + set(COMPILE_OPTIONS_DEFAULT # TODO: /wd4819 应该是不会生效 "/wd4566;/wd4819;/utf-8" # warning C4530: C++ exception handler used, but unwind semantics are not enabled.