版本
顺序
1.清理
xmake f -c
2. 切换为vs工具链
xmake f -p windows --toolchain=msvc --vs=2015 -a x64
3. 生成
xmake project -k vsxmake2015 -m "debug,release"
xmake 帮助
Usage: $xmake [task] [options] [target]
Build targets if no given tasks.
Actions:
b, build Build targets if no given tasks.
f, config Configure the project.
update Update and uninstall the xmake program.
r, run Run the project target.
i, install Package and install the target binary files.
c, clean Remove all binary and temporary files.
create Create a new project.
q, require Install and update required packages.
g, global Configure the global options for xmake.
u, uninstall Uninstall the project binary files.
p, package Package target.
Plugins:
service Start service for remote or distributed compilation and etc. (Experimental, still in development)
plugin Manage plugins of xmake.
l, lua Run the lua script.
doxygen Generate the doxygen document.
show Show the given project information.
repo Manage package repositories.
project Generate the project file.
m, macro Run the given macro.
Common options:
-q, --quiet Quiet operation.
-y, --yes Input yes by default if need user confirm.
--confirm=CONFIRM Input the given result if need user confirm.
- yes
- no
- def
-v, --verbose Print lots of verbose information for users.
--root Allow to run xmake as root.
-D, --diagnosis Print lots of diagnosis information (backtrace, check info ..) only for developers.
And we can append -v to get more whole information.
e.g. $ xmake -vD
--version Print the version number and exit.
-h, --help Print this help message and exit.
-F FILE, --file=FILE Read a given xmake.lua file.
-P PROJECT, --project=PROJECT Change to the given project directory.
Search priority:
1. The Given Command Argument
2. The Envirnoment Variable: XMAKE_PROJECT_DIR
3. The Current Directory
Command options (build):
-b, --build Build target. This is default building mode and optional.
-r, --rebuild Rebuild the target.
-a, --all Build all targets.
-g GROUP, --group=GROUP Build all targets of the given group. It support path pattern matching.
e.g.
xmake -g test
xmake -g test_*
xmake --group=benchmark/*
--dry-run Dry run to build target.
-j JOBS, --jobs=JOBS Set the number of parallel compilation jobs. (default: 18)
--linkjobs=LINKJOBS Set the number of parallel link jobs.
-w, --warning Enable the warnings output.
--files=FILES Build the given source files.
e.g.
- xmake --files=src/main.c
- xmake --files='src/*.c' [target]
- xmake --files='src/**c|excluded_file.c'
- xmake --files='src/main.c;src/test.c'
target The target name. It will build all default targets if this parameter is not specified.
- StatictisAssistant