--smallest=y|n option to --small=y|ntb_file_copyThis release fixed some bugs and improve some compilation problem.
If you want to known more usage, please see online documents。
add_files to configure the compile option of the given filestarget.add_deps and add inherit config, .e.g add_deps("test", {inherit = false})tbox.pkg/Zi instead of /ZI for msvctarget:add and option:add bugThis release introduces a number of new feature updates, as detailed in Some new features of xmake v2.1.5.
If you want to known more usage, please see online documents。
add_csnippet and add_cxxsnippet into option for detecting some compiler features.find_program, find_file, find_library, find_tool and find_package module interfaces.net.* and devel.* extension modulesval() api to get the value of builtin-variable, .e.g val("host"), val("env PATH"), val("shell echo hello") and val("reg HKEY_LOCAL_MACHINE\\XX;Value")has_flags, features and has_features for detect module interfaces.option.on_check, option.after_check and option.before_check apitarget.on_load apiadd_frameworkdirs apilib.detect.has_xxx and lib.detect.find_xxx apis.add_moduledirs apiincludes api instead of add_subdirs and add_subfilescompile_commands.json by run xmake project -k compile_commandsset_pcheader and set_pcxxheader to support the precompiled header, support gcc, clang, msvcxmake f -p cross platform and support the custom platformimport to load user extension and global modulesxmake lua to run a single line commandprint interface to dump table--root common option to allow run xmake command as rootxxx_script in xmake.lua to support pattern match, .e.g on_build("iphoneos|arm*", function (target) end)*.asm source files for vs201x project pluginadd_bindings and add_rbindings as deprecatedxmake rebuild speed on windowscore.project.task to core.base.taskecho and app2ipa plugins to xmake-plugins repo.set_config_header("config.h", {prefix = ""}) instead of set_config_h and set_config_h_prefixtry-catch-finallyget.shThis interface refers to the design of CMake for the find_* interfaces, which finds and adds package dependencies in the project target.
target("test")
set_kind("binary")
add_files("*.c")
on_load(function (target)
import("lib.detect.find_package")
target:add(find_package("zlib"))
end)
Now through find_package and option, we can achieve better package management.
option("zlib")
set_showmenu(true)
before_check(function (option)
import("lib.detect.find_package")
option:add(find_package("zlib"))
end)
target("test")
add_options("zlib")
If you want to manually disable this zlib package and automatic detection and linking, you only need:
$ xmake f --zlib=n
$ xmake
Note: We will implement package management 3.0 in the 2.2.1 version, if you want to known more info, please see:Remote package management。
For example:
add_requires("mbedtls master optional")
add_requires("pcre2 >=1.2.0", "zlib >= 1.2.11")
add_requires("git@github.com:glennrp/libpng.git@libpng >=1.6.28")
target("test")
add_packages("pcre2", "zlib", "libpng", "mbedtls")
We are currently working to develop …
xmake lua has supported REPL(read-eval-print), we can write and test script more easily now.
Enter interactive mode:
$ xmake lua
> 1 + 2
3
> a = 1
> a
1
> for _, v in pairs({1, 2, 3}) do
>> print(v)
>> end
1
2
3