windows11 xmake生成IDE工程文件

本文档介绍了xmake工具的使用流程,包括清理、切换VS工具链、生成项目等步骤。xmake支持多种任务,如构建、配置、运行、安装等,并允许用户自定义编译选项,如并行编译任务数、警告输出等。此外,还详细阐述了目标构建的选项,如构建模式、重置、分组构建等。
摘要由CSDN通过智能技术生成

版本

  • V2.6.4

顺序

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值