microsoft / microsoft/vscode-cpptools
Add support for specifying separate C and C++ compiler paths and args
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Feature Request
Currently, we have compilerPath and compilerArgs fields in c_cpp_properties.json. Arguments (i.e. -std=c++20 vs -std=c17), and perhaps even the compiler itself (i.e. XC16), can be C or C++ specific. These field may be insufficient for users who want to mix C and C++ sources. The same issue exists for fields in custom configuration provider interfaces.
This feature request tracks separating compilerPath and compilerArgs into C and C++, so separate values for each can be provided. One backwards compatible approach would be to allow the existing fields to be overloaded with an object containing a separate value per language. For example:
"compilerPath": {
"c": "/usr/bin/gcc",
"cpp": "/usr/bin/g++"
},
"compilerArgs": {
"c": [ "-std=c17" ],
"cpp": [ "-std=c++20" ]
}
Related: https://github.com/microsoft/vscode-cpptools/issues/7534
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
Start with the c_cpp_properties.json fields and the custom configuration provider interfaces described in the issue. Determine how separate C and C++ compiler paths and arguments can be represented while preserving existing fields; done means C and C++ sources can receive distinct values with backward compatibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100