From: LittleLoli Date: Fri, 14 Apr 2023 16:36:38 +0000 (+0800) Subject: cmake : add msvc compiler args /utf-8 fix error C3688 (#721) X-Git-Tag: upstream/1.7.4~1505 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=61128870b86e0d712f2c7b9be0949af6c6349834;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp cmake : add msvc compiler args /utf-8 fix error C3688 (#721) * force msvc compiler use utf-8 encode * only enable on msvc --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fbbb5209..9b6d4b70 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/")