-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
compile_commands additional toolchain include paths #1465
Comments
I seem to recall it was a design decision, but @bobbrow probably knows more. We try to query the compiler for the builtin includePaths, but there are cases in which that can be incorrect and the builtin defines are not used yet. We could theoretically change it so that the |
What you describe seems to be the intended behavior, but according to the documentation you should get a warning if there is no entry for the toolchain include paths:
|
@aakre Ah, yeah, I talked to Bob today and he mentioned that "fallback" behavior. I think we decided to add some sort of systemIncludePath/systemDefines setting which corresponds to what the built-in values used by your compiler and that would get appended on, and the existing includePath/defines would keep the same behavior and only be used as a fallback (combined with the system ones too). We were already planning to add separate "system" properties to solve some other issues. |
Hrmm, I'm cross-compiling through cmake (toolchain file), so I'm not very optimistic that the c++ extension will easily be able to determine the compiler automatically to determine the system includes. However it would be equally fine if I just could set the compiler executable manually in this case (if the extension can handle gcc derivates). |
@decimad 1. We're adding a setting to your compiler path. 2. We'll also query the compiler for defines. I think that would solve your issue. |
This should be covered by #1293. |
Hey,
it seems the extension ignores manually set include/browse paths once you have a compile_commands.json set up to be used. However in my case this file does not include the built-in toolchain include paths. Adding them to includePaths/browse does not seem to be recognized by the extension in this case.
Is the intentention for me to achieve this differently? Would it be possible to add these settings to the set gathered by parsing the compile_commands.json ?
The text was updated successfully, but these errors were encountered: