go2sh / cmake-integration-vscode

CMake Server Interface for VSCode.
https://go2sh.github.io/cmake-integration-vscode/
Other
19 stars 11 forks source link

Pass sysroot and compile flags to cpptools extension #14

Closed bjosa closed 5 years ago

bjosa commented 5 years ago

This pull request changes the compilerPath parameter that is passed to the vscode-cpptools extension API.

When cross compiling there are often applied hardware related compiler flags that alter the resulting system defines. Also a sysroot option may changes the location of the system include paths. By appending these parameters to the compilerPath parameter, the vscode-cpptools extension is able to browse the system defines and include paths from the used compiler.

Tested with gcc arm-linux-gnueabihf toolchain. Used compile flags: -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9

go2sh commented 5 years ago

Hi @bjosa , thank you for your contribution. I'am planing to release v0.4.0 next weekend. I'll need to write some more documentation, so that it easy to start with and to use. (e.g. for the new configuration file feature) I'll release a new beta build tonight with your feature and the bug fix for additional entries.

bjosa commented 5 years ago

Thanks for merging. Looking forward for many great features :-)