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

Added ability to specify paths for options files #347

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

muff1nman
Copy link

I wanted to be able to use out of tree builds with cmake, and not have to worry about copying over the compile_commands.json file. In this branch, you are now able to specify a filename to search for. In my case, I can specify:

let g:clang_auto_user_options = 'compile_commands.json'
let g:clang_compilation_database_search_path = 'build/compile_commands.json'

which will properly find all the header files based on my cmake configurations.

Now the the code isn't exactly perfect. As you can see above, I kept how the clang_auto_user_options worked for backwards compatabilty and decided to add two new global variables for specifying the search path. The other variable is for the .clang_complete search path (g:clang_complete_search_path). Im not sure if changing the path for .clang_complete is as helpful but I figured we should keep the logic the same.

@muff1nman
Copy link
Author

Any update on this? Thanks!

For both compile_commands.json and .clang_complete, there were added some global
variables to allow the user to customize where to find these files.
@xavierd
Copy link
Owner

xavierd commented Feb 15, 2014

I would prefer if you only add one configuration that specify the search path for both .clang_complete and compile_commands.json. Can you also rebase and squash all of those commits, and test with the autochdir option set?

Thanks,
Xavier

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

Successfully merging this pull request may close these issues.

2 participants