test: force source-charset to utf-8 in MSVC

prevents `tests\test-grammar-integration.cpp(483,13): error C2001: newline in constant` in non-UTF8 Windows shell
This commit is contained in:
蕭澧邦 2024-10-22 01:58:07 +08:00 committed by GitHub
parent dbd5f2f573
commit a5113451a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,3 +1,8 @@
if(WIN32)
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/source-charset:utf-8>")
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/source-charset:utf-8>")
endif()
function(llama_test target) function(llama_test target)
include(CMakeParseArguments) include(CMakeParseArguments)
set(options) set(options)