-
Notifications
You must be signed in to change notification settings - Fork 430
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
Compiler flags containing spaces not passed correctly to IntelliSense #1414
Comments
Can you enable Debug logging for cpptools which will print out the configurations sent by CMake Tools? After enabling the logging, please run the "Reload Window" command to reset the extension which will cause the configuration to be resent. If you can send that log and also the log printed when you run the "Log Diagnostics" command, that would be super helpful. Thanks! |
Surprise: the compiler path seems to be passed correctly to cpptools, AFAICS.
|
I see "browsePath" configurations sent here, but I didn't see any information about source files that were open for IntelliSense. Can you open one of your source files and share what the "custom" configuration for that file is reported to be? And also run the "Log Diagnostics" command after opening that source file in the editor. This will help us know where things might have gone wrong. |
Ok, after opening a source file, cpptools shows in the log the compiler path split by spaces, see bottom of the log.
|
Here's the log diagnostics output. As with the previous log, I shorted the list of files as they're proprietary but there's no compiler related paths there, only project-related ones.
|
This is perfect! Thanks for the logs. It looks like the problem is with this compiler flag: |
We almost have CMake Tools 1.6.0 release out the door. Until then, if you want, you can also verify if this problem has been fixed correctly by installing the vsix built here: https://github.com/microsoft/vscode-cmake-tools/actions/runs/557242002#artifacts. |
Looks like this bug is still present in the current CMake Tools (1.7.3)? |
@patrislav1, we will double check. Can you answer if this ever worked for 1.6.0? It is possible that it regressed with 1.7.3. Or you didn't check until now? |
I worked around it on my machine (changed compiler location) and didn't pay any more attention tbh. Now a colleague installed the same environment (with default compiler location, containing whitespaces) and bumped into the same bug even though he has the recent 1.7.3 version. I'll check if I can reproduce with 1.6.0, if that helps. |
With CMake Tools 1.6.0 I see the very same bug. See the debug output below (it's from a German installation, sorry, I hope it's still helpful). The not quoted
|
@patrislav1 please take a look at this PR and let us know if it solved your issue.
However, the |
We will provide a VSIX soon with this fix so that you can test it with your scenario. I will update you. |
@patrislav1 here is the link to the VSIX, please try it and let us know if it resolves your issue: |
Brief Issue Summary
Using custom CMake toolchain which is referenced in project-local kit
.vscode\cmake-kits.json
:Intellisense is configured via
.vscode\settings.json
to receive configuration from cmake-tools:The cmake toolchain succeeds in locating the compiler and cmake-tools receives the compiler information, after I implemented the cmake cache workaround.
The project build works as expected.
However, Intellisense C++ fails to locate the standard C library include files and marks the
#include
statements with squiggles.The arm-gcc toolchain is on a Windows machine on a
C:\Program Files (x86)\...
path, thus containing a whitespace.When I move it to
C:\arm-gnu-toolchain
, eliminating the whitespace in the path, and reconfigure the project, then IntelliSense works and the affected#include
files are found.I assume the compiler path is not passed correctly from cmake-tools to IntelliSense, maybe there are quotes missing somewhere along the way.
Platform and Versions
The text was updated successfully, but these errors were encountered: