question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using ${buildKit} in c_cpp_properties.json not working

See original GitHub issue

Brief Issue Summary

It’s really great that since version 1.1.2 the ${buildKit} variable is use able for defining the build directory. With this i can multiple toolchains with separate build folders without rebuilding everything. I currently get an error with cpp-tools though, which looks for the compile_commands.json

image

This is true since my cmake.buildDirectoty includes the ${buildKit} variable. It seems the same variable can’t be used in the c_cpp_properties.json. I have to add the exact path by hand and also have to change it, when i switch my kit for different toolchain file.

Expected:

Would be great if ${buildKit} would work in c_cpp_properties.json but i’m not sure if this is the right approach. It might be more of an issue for the cpp-tools.

Platform and Versions

  • Operating System: Windows
  • CMake Version: 3.13.1
  • VSCode Version: 1.30.1
  • CMake Tools Extension Version: 1.1.3
  • Compiler/Toolchain: arm-none-eabi-gcc

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
mjvankampencommented, Jul 16, 2019

Would it not be possible to have something like ${command:cmake.buildDirectory} with the ${buildKit} and such already resolved, similar to ${command:cmake.launchDirectory}? This would also help me for other artifacts being produced such as coverage reports.

0reactions
hriekehofcommented, Dec 11, 2019

ah great to hear that. i looking forward to it

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code Intellisense can't recognize buildType or buildKit
I have a VS Code CMake project configured with buildTypes (debug,release) and kits (arm,...) where i have defined my CMake cross-compiled ...
Read more >
c_cpp_properties.json reference - Visual Studio Code
json or launch. json to query the current active configuration from c_cpp_properties. json . To do this, use the variable ${command:cpptools.
Read more >
vscode-cmake-tools/support - Gitter
Before trying it in Visual Studio I can run cmake in the build folder with no problem, but afterwards it always fails and...
Read more >
Working with Visual Studio Code — OpenPASS Documentation
An optimal solution would be to set the system environment variables in VSCode under settings.json . This is currently not possible.
Read more >
How to use Visual Studio Code to write C++ for PLCnext
Edit the vscode workspace settings located in ./vscode/settings.json . Change the CMake Build Directory setting. CMake Tools should place the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found