Add a command that returns the resolved value of cmake.buildDirectory
See original GitHub issueBrief Issue Summary
Using ${config:cmake.buildDirectory} in launch.json with visual cpp debugger doesn’t work. After a successful cmake configure the ${config:cmake.buildDirectory} is not correctly resolved. In my example in settings.json the cmake.buildDirectory looks like this:
"cmake.buildDirectory": "${workspaceFolder}/../CMakeBuild/vscode/NSW-51770/${buildKit}/${buildType}",
The ${buildKit} and ${buildType} are not resolved but just copied into the resulting string.
Expected:
cmake.buildDirectory is correctly resolved
Platform and Versions
- Operating System: Windows
- CMake Version: 3.14
- VSCode Version: 1.34
- CMake Tools Extension Version: 1.1.3
- Compiler/Toolchain: Visual C++ 2019
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:9 (5 by maintainers)
Top Results From Across the Web
CMake 3.25.1 Documentation
If a command in the project sets the type to PATH or FILEPATH then the <value> will be converted to an absolute path....
Read more >file — CMake 3.25.1 Documentation
This command is dedicated to file and path manipulation requiring access to the ... it is determined by the value of CMAKE_OBJDUMP if...
Read more >ExternalProject — CMake 3.25.1 Documentation
The ExternalProject_Add() function creates a custom target to drive download, update/patch, configure, build, install and test steps of an external project:.
Read more >Cross Platform Make - CMake
If COMMENT is set, the value will be displayed as a message before the commands are executed at build time. If APPEND is...
Read more >Master Index CMake 2.8.12
The "cmake" executable is the CMake command-line interface. ... add_test command. Note that ctest expects to find a test file in the build...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the answer. I can not use launchTargetDirectory as I have multiple targets in my project. The launch.json has several targets listed. Example launch.json:
Using ${config:cmake.buildDirectory} isn’t working. Any solution for that?
As I have been reviewing the existing issues, I found that there is already one tracking this request. #564