Skip to content

Commit 1a180f5

Browse files
committed
issue/55: 改正 xmake 配置文件,处理 Windows 上字符编码问题并正确设置编译选项
Signed-off-by: YdrMaster <ydrml@hotmail.com>
1 parent cab502e commit 1a180f5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

xmake.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ local YELLOW = '\27[1;33m'
55
local NC = '\27[0m' -- No Color
66

77
add_includedirs("include")
8+
set_encodings("utf-8")
89

910
if is_mode("debug") then
1011
add_cxflags("-g -O0")
@@ -84,8 +85,8 @@ option("moore-gpu")
8485
option_end()
8586

8687
if has_config("mthreads-gpu") then
87-
add_defines("ENABLE_MUSA_API")
88-
end
88+
add_defines("ENABLE_MUSA_API")
89+
end
8990

9091
-- 海光
9192
option("sugon-dcu")

xmake/cpu.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ target("infiniop-cpu")
22
on_install(function (target) end)
33
set_kind("static")
44

5-
add_cxflags("-Wall", "-Werror")
5+
set_warnings("all", "error")
66

77
if not is_plat("windows") then
88
add_cxflags("-fPIC")
@@ -14,4 +14,4 @@ target("infiniop-cpu")
1414
add_cxflags("-fopenmp")
1515
add_ldflags("-fopenmp")
1616
end
17-
target_end()
17+
target_end()

0 commit comments

Comments
 (0)