Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Allow multiple compile_commands.json #872

Open
Timmmm opened this issue May 13, 2019 · 1 comment
Open

Allow multiple compile_commands.json #872

Timmmm opened this issue May 13, 2019 · 1 comment

Comments

@Timmmm
Copy link

Timmmm commented May 13, 2019

I'm using the VSCode extension, which allows you to specify a directory for compile_commands.json (good, I don't want to pollute my source with build files). However I'm using a workspace with several separate projects (which depend on each other). Each has its own compile_commands.json.

This is the same situation as #835 - he is using a hacky sed script to concatenate the compile_commands.json into one file. That's not a very good solution though because:

a) I have to make my build system know about all of the compile_commands.json files and rebuild the combined one when any of them changes. It's not going to be pretty.
b) #835

Instead it would be better if you could just give a list of compile_commands.json files to cquery and it would monitor all of them.

@Timmmm
Copy link
Author

Timmmm commented May 16, 2019

I did find that in addition to the compilationDatabaseDirectory option there is compilationDatabaseCommand which would allow me to combine the multiple compile_commands.json. It isn't exposed in the VSCode extension but it looks like adding it would be easy.

However a command is not quite as good because you can't monitor it for changes. On the other hand, I had a look through the cquery source code and I can't see if it actually monitors compile_commands.json for changes anyway so maybe it is just as good.

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

No branches or pull requests

1 participant