diff options
Diffstat (limited to 'xmake.lua')
| -rw-r--r-- | xmake.lua | 86 |
1 files changed, 55 insertions, 31 deletions
@@ -1,23 +1,24 @@ add_requires( - "vcpkg::doctest", - "vcpkg::spdlog", - "vcpkg::gsl-lite", - "vcpkg::asio", - "vcpkg::cpr", - "vcpkg::xxhash", - "vcpkg::robin-map", - "vcpkg::lz4", - "vcpkg::fmt", - "vcpkg::cxxopts", - "vcpkg::mimalloc", - "vcpkg::sol2", - "vcpkg::sentry-native", + "vcpkg::asio", + "vcpkg::cpr", + "vcpkg::curl", + "vcpkg::cxxopts", + "vcpkg::doctest", + "vcpkg::fmt", + "vcpkg::gsl-lite", + "vcpkg::http-parser", "vcpkg::json11", - "vcpkg::lua", - "vcpkg::curl", - "vcpkg::zlib", - "vcpkg::zstd", - "vcpkg::http-parser") + "vcpkg::lua", + "vcpkg::lz4", + "vcpkg::mimalloc", + "vcpkg::robin-map", + "vcpkg::sentry-native", + "vcpkg::sol2", + "vcpkg::spdlog", + "vcpkg::xxhash", + "vcpkg::zlib", + "vcpkg::zstd" +) add_rules("mode.debug", "mode.release") @@ -39,27 +40,50 @@ else end if is_os("windows") then - add_defines("_CRT_SECURE_NO_WARNINGS", "_UNICODE", "UNICODE", "_WIN32_WINNT=0x0A00") + add_defines( + "_CRT_SECURE_NO_WARNINGS", + "_UNICODE", + "UNICODE", + "_CONSOLE", + "NOMINMAX", -- stop Windows SDK defining 'min' and 'max' + "NOGDI", -- otherwise Windows.h defines 'GetObject' + "WIN32_LEAN_AND_MEAN", -- cut down Windows.h + "_WIN32_WINNT=0x0A00" + ) -- add_ldflags("/MAP") end +if is_os("linux") then + add_cxxflags("-Wno-unused-value") + add_cxxflags("-Wno-strict-aliasing") + add_cxxflags("-Wno-implicit-fallthrough") + add_cxxflags("-Wno-missing-field-initializers") +end + add_defines("USE_SENTRY=1") add_defines("ZEN_USE_MIMALLOC=1") -option("vfs") - set_showmenu(true) - set_description("Enable VFS functionality") - add_defines("ZEN_WITH_VFS") -option_end() +if is_os("windows") then + option("vfs") + set_showmenu(true) + set_description("Enable VFS functionality") + add_defines("ZEN_WITH_VFS") + option_end() -option("httpsys") - set_default(true) - set_showmenu(true) - set_description("Enable http.sys server") - add_defines("ZEN_WITH_HTTPSYS") -option_end() + option("httpsys") + set_default(true) + set_showmenu(true) + set_description("Enable http.sys server") + add_defines("ZEN_WITH_HTTPSYS") + option_end() -add_defines("UNICODE", "_CONSOLE") + option("compute") + set_default(true) + set_showmenu(true) + set_description("Enable compute services endpoint") + add_defines("ZEN_WITH_COMPUTE_SERVICES") + option_end() +end set_warnings("allextra", "error") set_languages("cxx20") |