代码拉取完成,页面将自动刷新
同步操作将从 tboox/tbox 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
-- project
set_project("tbox")
-- set xmake minimum version
set_xmakever("2.2.5")
-- set project version
set_version("1.6.4", {build = "%Y%m%d%H%M"})
-- set warning all as error
set_warnings("all", "error")
-- set language: c99
stdc = "c99"
set_languages(stdc)
-- add defines to config.h
set_configvar("_GNU_SOURCE", 1)
set_configvar("_REENTRANT", 1)
-- disable some compiler errors
add_cxflags("-Wno-error=deprecated-declarations", "-fno-strict-aliasing", "-Wno-error=expansion-to-defined")
add_mxflags("-Wno-error=deprecated-declarations", "-fno-strict-aliasing", "-Wno-error=expansion-to-defined")
-- the debug, coverage, valgrind or sanitize-address/thread mode
if is_mode("debug", "coverage", "valgrind", "asan", "tsan") then
-- enable the debug symbols
set_symbols("debug")
-- disable optimization
set_optimize("none")
-- add defines for debug
if is_mode("debug") then
add_defines("__tb_debug__")
end
-- add defines for valgrind
if is_mode("valgrind") then
add_defines("__tb_valgrind__")
end
-- attempt to enable sanitize-address
if is_mode("asan") then
add_cxflags("-fsanitize=address", "-ftrapv")
add_mxflags("-fsanitize=address", "-ftrapv")
add_ldflags("-fsanitize=address")
add_defines("__tb_sanitize_address__")
end
-- attempt to enable sanitize-thread
if is_mode("tsan") then
add_cxflags("-fsanitize=thread")
add_mxflags("-fsanitize=thread")
add_ldflags("-fsanitize=thread")
add_defines("__tb_sanitize_thread__")
end
-- enable coverage
if is_mode("coverage") then
add_cxflags("--coverage")
add_mxflags("--coverage")
add_ldflags("--coverage")
end
end
-- the release, profile mode
if is_mode("release", "profile") then
-- the release mode
if is_mode("release") then
-- set the symbols visibility: hidden
set_symbols("hidden")
-- strip all symbols
set_strip("all")
-- the profile mode
else
-- enable the debug symbols
set_symbols("debug")
-- enable gprof
add_cxflags("-pg")
add_ldflags("-pg")
end
-- small or micro?
if has_config("small", "micro") then
set_optimize("smallest")
else
set_optimize("fastest")
end
-- disable stack protector for micro mode
if has_config("micro") then
add_cxflags("-fno-stack-protector")
end
end
-- small or micro?
if has_config("small", "micro") then
-- add defines for small
add_defines("__tb_small__")
-- add defines to config.h
set_configvar("TB_CONFIG_SMALL", 1)
end
-- for the windows platform (msvc)
if is_plat("windows") then
-- add some defines only for windows
add_defines("NOCRYPT", "NOGDI")
-- the release mode
if is_mode("release") then
-- link libcmt.lib
add_cxflags("-MT")
-- the debug mode
elseif is_mode("debug") then
-- enable some checkers
add_cxflags("-Gs", "-RTC1")
-- link libcmtd.lib
add_cxflags("-MTd")
end
-- no msvcrt.lib
add_ldflags("-nodefaultlib:msvcrt.lib")
add_syslinks("ws2_32")
elseif is_plat("android") then
add_syslinks("m", "c")
elseif is_plat("mingw", "msys", "cygwin") then
add_syslinks("ws2_32", "pthread", "m")
else
add_syslinks("pthread", "dl", "m", "c")
end
-- enable backtrace symbols for linux
if is_plat("linux") and is_mode("debug") then
add_ldflags("-rdynamic")
end
-- include project sources
includes("src")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。