From a5113451a37e2a95fe8a694c718611a37d9fa622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=95=AD=E6=BE=A7=E9=82=A6?= <45505768+shou692199@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:58:07 +0800 Subject: [PATCH] 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 --- tests/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 08ad66b49..b1b41abd4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,8 @@ +if(WIN32) + add_compile_options("$<$:/source-charset:utf-8>") + add_compile_options("$<$:/source-charset:utf-8>") +endif() + function(llama_test target) include(CMakeParseArguments) set(options)