microsoft / microsoft/vscode-cmake-tools
The configuration provider sends msvc intelliSenseMode for IAR compiler
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
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.
-------- Diagnostics - 2/25/2020, 2:51:31 PM
Version: 0.26.3
Current Configuration:
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/drivers/Include/**",
"${workspaceFolder}/drivers/netx_drv/Include/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:\\Program Files (x86)\\GNU Tools Arm Embedded\\9 2019-q4-major\\bin\\arm-none-eabi-gcc.exe",
"intelliSenseMode": "gcc-x64",
"compilerArgs": [
"-mthumb ",
"-mcpu=cortex-m4"
],
"configurationProvider": "vector-of-bool.cmake-tools",
"browse": {
"path": [
"${workspaceFolder}/**",
"${workspaceFolder}/drivers/Include/**",
"${workspaceFolder}/drivers/netx_drv/Include/**"
],
"limitSymbolsToIncludedHeaders": true
}
}
Translation Unit Configurations:
[ C:\Users\pfox\ESeries\Firmware\firmware\CMSIS\Include\cmsis_iccarm.h ]:
Process ID: 28372
Memory Usage: 16 MB
Compiler Path: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
Includes:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.24.28314/include/*
C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.24.28314/atlmfc/include/*
C:/Program Files (x86)/Windows Kits/10/Include/10.0.18362.0/um
C:/Program Files (x86)/Windows Kits/10/Include/10.0.18362.0/ucrt
C:/Program Files (x86)/Windows Kits/10/Include/10.0.18362.0/shared
C:/Program Files (x86)/Windows Kits/10/Include/10.0.18362.0/winrt
C:/Program Files (x86)/Windows Kits/10/Include/10.0.18362.0/cppwinrt
Standard Version: ms_c++17
IntelliSense Mode: msvc-x64
Other Flags:
--header_only_fallback
Total Memory Usage: 16 MB
Other Notes/Information
Clang may be a better fallback if the compiler can't be identified, since it's probably the most broadly compatible.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files or tests. Start by tracing how the configuration provider handles compiler detection and fallback IntelliSense settings, then determine where project-level overrides could be accepted. Done means an unsupported IAR compiler no longer forces msvc-x64 and the requested override is respected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100