-
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
The configuration provider sends msvc intelliSenseMode for IAR compiler #1096
Comments
Easy to change the default. We could also add a new setting for this. |
Also, can you run your scenario again, after setting the CppTools logging level to "debug" (https://code.visualstudio.com/docs/cpp/enable-logging-cpp) and share with us the configurations sent by CMake Tools to CppTools? Look for "custom configurations received". You can also share the whole log and we will parse through it for helpful information. |
Let us know if this is still an issue for you. If it is, please provide the logs (as explained above). |
OK, I have gotten a log. I've had to blank out some file names and private information, but that is mostly not relevant to this issue:
|
Unfortunately, this is not the log we are looking for. We need you to turn on the C_Cpp.loggingLevel setting and look in the Output window for the "custom configurations received" so we can see if CMake Tools is sending the right compiler info. |
My workspace config is as follows:
I'm not seeing any output with "custom configurations received" in the Output Window. Is some other step required to get this? |
Maybe this is what you're looking for?
|
OK, I think I was able to get the full output from a test project:
From this it looks like "intelliSenseMode": "msvc-x64" is in the configuration that cmake-tools sends to C/C++. It does also send a compiler path, which C/C++ tries to query, but fails because the compiler is not supported. |
Thank you. This log helps a lot. I thought you were using |
Sorry, yes, I actually did try to specify the arm-none-eabi-gcc compiler in my c_cpp_properties.json in hopes that it would use that as a fallback, but it only appears to do that sometimes. It looks like if I change that after doing the CMake config, it takes until the next time I configure or reopen VS Code, so I think cmake-tools is overriding that setting with the IAR compiler path, which doesn't configure correctly. What I'd like to be able to do is to have cmake-tools fall back to a manual configuration for the compiler if the compiler is not supported instead of pushing an unsupported config which will break Intellisense. |
What you may need to do for the time being is use |
This issue is now marked as 'stale-old' due to there being no activity on it for the past 720 days. Unless the 'stale-old' label is removed or the issue is commented on, this will be remain open for at least 14 days and then it may be closed. If you would like to make this issue exempt from getting stale, please add the 'stale-exempt' label. |
Brief Issue Summary
When a compiler cmake-tools is not familiar with is used by CMake (e.g. an embedded compiler with a custom toolchain file), it ignores all other settings and defaults to the MSVC Intellisense mode on Windows. This is usually undesirable, since embedded code is not generally compatible with MSVC.
Expected:
There should be a way to manually override the intellisense settings on a project basis (possibly in cmake-kits.json?) so it can be used as a configuration provider even if the compiler being used by cmake is not supported.
C/C++ log file
In the log below it can be seen that the settings specified in c_cpp_properties.json are not respected and msvc intellisense mode is used when the IAR compiler is specified by a cmake toolchain.
Other Notes/Information
Clang may be a better fallback if the compiler can't be identified, since it's probably the most broadly compatible.
The text was updated successfully, but these errors were encountered: