This commit is contained in:
fasiondog 2024-08-08 18:35:56 +08:00
parent 4a44054d95
commit fb03e9f129
2 changed files with 8 additions and 8 deletions

View File

@ -126,6 +126,8 @@ def start_build(verbose=False, mode='release', feedback=True, worker_num=2, low_
cmd = "xmake f {} -c -y -m {} --feedback={} -k {} --low_precision={} --log_level={}".format( cmd = "xmake f {} -c -y -m {} --feedback={} -k {} --low_precision={} --log_level={}".format(
"-v -D" if verbose else "", mode, feedback, "shared" if mode == 'release' else "static", low_precision, "-v -D" if verbose else "", mode, feedback, "shared" if mode == 'release' else "static", low_precision,
2 if mode == 'release' else 0) 2 if mode == 'release' else 0)
if sys.platform == 'win32':
cmd = f'{cmd} --runtimes=MD'
print(cmd) print(cmd)
os.system(cmd) os.system(cmd)

View File

@ -115,7 +115,6 @@ set_configvar("HKU_ENABLE_HTTP_CLIENT_ZIP", 0)
local boost_version = "1.85.0" local boost_version = "1.85.0"
local hdf5_version = "1.12.2" local hdf5_version = "1.12.2"
local fmt_version = "11.0.1"
local flatbuffers_version = "24.3.25" local flatbuffers_version = "24.3.25"
local nng_version = "1.8.0" local nng_version = "1.8.0"
local sqlite_version = "3.46.0+0" local sqlite_version = "3.46.0+0"
@ -156,7 +155,6 @@ elseif is_plat("macosx") then
end end
add_requires("boost " .. boost_version, { add_requires("boost " .. boost_version, {
system = false,
debug = is_mode("debug"), debug = is_mode("debug"),
configs = { configs = {
shared = is_plat("windows"), shared = is_plat("windows"),
@ -170,13 +168,13 @@ add_requires("boost " .. boost_version, {
}, },
}) })
add_requires("fmt " .. fmt_version, {system = false}) add_requires("fmt", {configs = {header_only = true}})
add_requires("spdlog", {system = false, configs = {header_only = true, fmt_external = true}}) add_requires("spdlog", {configs = {header_only = true, fmt_external = true}})
add_requireconfs("spdlog.fmt", {override = true, version = fmt_version, system = false}) add_requireconfs("spdlog.fmt", {override = true, configs = {header_only = true}})
add_requires("sqlite3 " .. sqlite_version, {system = false, configs = {shared = true, cxflags = "-fPIC"}}) add_requires("sqlite3 " .. sqlite_version, {configs = {shared = true, cxflags = "-fPIC"}})
add_requires("flatbuffers v" .. flatbuffers_version, {system = false, configs= {runtimes = get_config("runtimes")}}) add_requires("flatbuffers v" .. flatbuffers_version, {system = false, configs= {runtimes = get_config("runtimes")}})
add_requires("nng " .. nng_version, {system = false, configs = {cxflags = "-fPIC"}}) add_requires("nng " .. nng_version, {configs = {cxflags = "-fPIC"}})
add_requires("nlohmann_json", {system = false}) add_requires("nlohmann_json")
add_defines("SPDLOG_DISABLE_DEFAULT_LOGGER") -- 禁用 spdlog 默认ogger add_defines("SPDLOG_DISABLE_DEFAULT_LOGGER") -- 禁用 spdlog 默认ogger