aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/xmake.lua
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-03-16 10:56:11 +0100
committerGitHub Enterprise <[email protected]>2026-03-16 10:56:11 +0100
commit8c3ba4e8c522d119df3cb48966e36c0eaa80aeb9 (patch)
treecf51b07e097904044b4bf65bc3fe0ad14134074f /thirdparty/xmake.lua
parentMerge branch 'sb/no-network' of https://github.ol.epicgames.net/ue-foundation... (diff)
parentEnable cross compilation of Windows targets on Linux (#839) (diff)
downloadzen-sb/no-network.tar.xz
zen-sb/no-network.zip
Merge branch 'main' into sb/no-networksb/no-network
Diffstat (limited to 'thirdparty/xmake.lua')
-rw-r--r--thirdparty/xmake.lua17
1 files changed, 12 insertions, 5 deletions
diff --git a/thirdparty/xmake.lua b/thirdparty/xmake.lua
index 1fb5acad7..e8832d50a 100644
--- a/thirdparty/xmake.lua
+++ b/thirdparty/xmake.lua
@@ -36,8 +36,8 @@ target('rpmalloc')
set_kind("static")
set_group('thirdparty')
set_languages("c17", "cxx20")
- if is_os("windows") then
- add_cflags("/experimental:c11atomics", {force=true})
+ if is_os("windows") and not (get_config("toolchain") or ""):find("clang") then
+ add_cflags("/experimental:c11atomics", {force=true, tools="cl"})
end
add_defines("RPMALLOC_FIRST_CLASS_HEAPS=1", "ENABLE_STATISTICS=1", "ENABLE_OVERRIDE=0")
add_files("rpmalloc/rpmalloc.c")
@@ -67,7 +67,11 @@ target('cpr')
target('asio')
set_kind('headeronly')
set_group('thirdparty')
- add_defines("ASIO_STANDLONE", "ASIO_HEADER_ONLY", {public=true})
+ add_defines("ASIO_STANDALONE", "ASIO_HEADER_ONLY", {public=true})
+ if is_plat("linux") and not (get_config("toolchain") == "ue-clang") then
+ add_defines("ASIO_HAS_IO_URING", {public=true})
+ add_packages("liburing", {public=true})
+ end
add_headerfiles("asio/asio/include/**.hpp")
add_includedirs("asio/asio/include", {public=true})
@@ -78,8 +82,8 @@ target("blake3")
add_headerfiles("blake3/c/blake3.h")
add_includedirs("blake3/c", {public=true})
- if is_os("windows") then
- add_cflags("/experimental:c11atomics")
+ if is_os("windows") and not (get_config("toolchain") or ""):find("clang") then
+ add_cflags("/experimental:c11atomics", {tools="cl"})
add_cflags("/wd4245", {force = true}) -- conversion from 'type1' to 'type2', possible loss of data
elseif is_os("macosx") then
add_cflags("-Wno-unused-function")
@@ -135,6 +139,9 @@ target("fmt")
set_kind("static")
set_group("thirdparty")
set_warnings("allextra")
+ if is_plat("windows") then
+ add_cxxflags("/wd4834", {force=true}) -- C4834: discarding return value of [[nodiscard]] function
+ end
add_files("fmt/src/format.cc", "fmt/src/os.cc")
add_headerfiles("fmt/include/**.h")
add_includedirs("fmt/include", {public=true})