Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ArthurVasseur opened this issue Feb 8, 2025 · 1 comment
Labels

Comments

@ArthurVasseur
Copy link

ArthurVasseur commented Feb 8, 2025

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

@waruqi
Copy link
Member

waruqi commented Feb 11, 2025

Usage: $xmake project [options] [target]

it's outdated, it should be

xmake project [options] [outputdir]

I have updated it.

you can open a pr to support for xmake project [options] [target] . But all project generators need to be supported at the same time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants