From 61128870b86e0d712f2c7b9be0949af6c6349834 Mon Sep 17 00:00:00 2001 From: LittleLoli <26589867+WhichWho@users.noreply.github.com> Date: Sat, 15 Apr 2023 00:36:38 +0800 Subject: [PATCH] cmake : add msvc compiler args /utf-8 fix error C3688 (#721) * force msvc compiler use utf-8 encode * only enable on msvc --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbbb5209d2d..9b6d4b709c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,10 @@ cmake_minimum_required (VERSION 3.0) project(whisper.cpp VERSION 1.2.1) +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + add_compile_options(/utf-8) +endif () + # Add path to modules list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")