]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
cmake : add msvc compiler args /utf-8 fix error C3688 (#721)
authorLittleLoli <redacted>
Fri, 14 Apr 2023 16:36:38 +0000 (00:36 +0800)
committerGitHub <redacted>
Fri, 14 Apr 2023 16:36:38 +0000 (19:36 +0300)
* force msvc compiler use utf-8 encode

* only enable on msvc

CMakeLists.txt

index fbbb5209d2d6a368c902559d09cb0d31eb79ceec..9b6d4b709c183cdcde0453ec52db74360f2b597a 100644 (file)
@@ -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/")