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

alternate among multiple compile_command.json files #966

Open
windrg opened this issue Jun 18, 2024 · 0 comments
Open

alternate among multiple compile_command.json files #966

windrg opened this issue Jun 18, 2024 · 0 comments

Comments

@windrg
Copy link

windrg commented Jun 18, 2024

Observed behavior

Hi,
I really appreciate your this great work first of all, especially it’s very helpful for me to understand the context in reading codes through using “Call Hierachy”.
By the way, now I’m about to ask one thing rather than reporting a bug or complainning.
My problem is,
My project is set to compile a source code twice(or more times) for its certain purpose switching its preprocessor.
In other words, it can have multiple compile_command.json files - for example, one has a compilation switch “SWITCH_A” and the other one has “SWITCH_B” instead of “SWITCH_A”.
For your understanding,

#ifdef SWITCH_A
#define APPLE (3)
#elif defined SWITCH_B
#define APPLE (10)
#804

so I can tell this project can have 2 compile_commands.json.
I can generate those 2 but I could not figure out so far how to switch from one to the other,
instead of renaming one of those 2 to “compile_commands.json”.

Expected behavior

I need your advice to switch among those multiple commands, in more elegant way.

Steps to reproduce

System information

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

No branches or pull requests

1 participant