Skip to content

xmake project -k XXX<target> generates a folder instead of filtering targets #6140

@ArthurVasseur

Description

@ArthurVasseur

Xmake Version

v2.9.8+HEAD.13fc39238

Operating System Version and Architecture

N/A

Describe Bug

Running xmake project -h outputs the following usage information:

xmake v2.9.8+HEAD.13fc39238, A cross-platform build utility based on Lua
Copyright (C) 2015-present Ruki Wang, tboox.org, xmake.io
                         _
    __  ___ __  __  __ _| | ______
    \ \/ / |  \/  |/ _  | |/ / __ \
     >  <  | \__/ | /_| |   <  ___/
    /_/\_\_|_|  |_|\__ \|_|\_\____|
                         by ruki, xmake.io
    
    👉  Manual: https://xmake.io/#/getting_started
    🙏  Donate: https://xmake.io/#/sponsor
    

Usage: $xmake project [options] [target]

...

This suggests that specifying a target should generate a project specifically for that target.

Running xmake project -k compile_commands foo creates a folder named foo and places the compile_commands.json inside it.
The generated compile_commands.json contains compilation commands for both foo and bar, instead of being filtered to include only foo.

Expected Behavior

A compile_commands.json file should be generated only for the foo target.

Project Configuration

target("foo")
    ...
target("bar")
    ...

Additional Information and Error Logs

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions