From: 蕭澧邦 Date: Tue, 19 Nov 2024 17:42:00 +0000 (+0800) Subject: cmake: force MSVC compiler charset to utf-8 (#9989) X-Git-Tag: upstream/0.0.4488~353 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=342397dc7edb311e0373205134d0d3a928b891b3;p=pkg%2Fggml%2Fsources%2Fllama.cpp cmake: force MSVC compiler charset to utf-8 (#9989) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 93c60ef4..994e61e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,13 @@ if (WIN32) add_compile_definitions(_CRT_SECURE_NO_WARNINGS) endif() +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + add_compile_options("$<$:/source-charset:utf-8>") + add_compile_options("$<$:/source-charset:utf-8>") + add_compile_options("$<$:/execution-charset:utf-8>") + add_compile_options("$<$:/execution-charset:utf-8>") +endif() + # # option list #