fix utfcpp test failed on windows (#1303)

pull/1405/head
爱玩耍的咸鱼(happyxianyu) 2 years ago committed by GitHub
parent cc98eec4b6
commit 2f1a8a8eab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      packages/u/utfcpp/xmake.lua

@ -18,7 +18,7 @@ package("utfcpp")
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
local test_snippet = [[
#define UTF_CPP_CPLUSPLUS 201103L
#include <utf8cpp/utf8.h>
void test() {
@ -26,5 +26,11 @@ package("utfcpp")
std::u16string u16line = utf8::utf8to16(line);
std::string u8line = utf8::utf16to8(u16line);
}
]]}, {configs = {languages = "c++11"}}))
]]
if package:is_plat("windows") then
assert(package:check_cxxsnippets({test = test_snippet}, {configs = {languages = "c++11", cxflags = "/utf-8"}}))
else
assert(package:check_cxxsnippets({test = test_snippet}, {configs = {languages = "c++11"}}))
end
end)

Loading…
Cancel
Save