Skip to content

Conversation

benmcmorran
Copy link
Member

This changes commands for command substitution and associated documentation.

The following changes are proposed:

3 new commands: cmake.activeConfigurePresetName, cmake.activeBuildPresetName, cmake.activeTestPresetName. Each returns a string with the name of the corresponding preset, or an empty string if the preset is not available.

The purpose of this change

These commands are designed to be used with the command substitution syntax in launch.json or tasks.json. They help to write generic launch configurations or tasks in the presence of CMake projects with multiple presets that may use the ${presetName} macro to select the binaryDir. While the existing cmake.launchTargetPath can often also be used in this situation, it can't handle constructing the path to files that aren't the target (e.g. associated debug information or, for embedded applications, hex or bin files).

FYI @aleun @gcampbell-msft

@bobbrow bobbrow added this to the 1.11.0 milestone Mar 21, 2022
@elahehrashedi
Copy link
Contributor

@benmcmorran there has been some renaming recently, can you apply it to your branch so that the builds pass, they are failing currently.

@elahehrashedi elahehrashedi merged commit f23388d into microsoft:main Apr 1, 2022
@benmcmorran benmcmorran deleted the dev/bemcmorr/add-preset-name-commands branch April 21, 2022 23:22
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants