Open hwmaier opened 3 years ago
Good idea, thank you for the feature request.
This would be a very simple change and this is a good example PR that added similar new commands in the past (in case anyone would be interested to implement this). https://github.com/microsoft/vscode-cmake-tools/pull/1488
This issue is now marked as 'stale-old' due to there being no activity on it for the past 720 days. Unless the 'stale-old' label is removed or the issue is commented on, this will be remain open for at least 14 days and then it may be closed. If you would like to make this issue exempt from getting stale, please add the 'stale-exempt' label.
Hi Garrett, has this been implemented?
@hwmaier From what I can tell, we currently have the three commands:
cmake.getLaunchTargetPath
cmake.getLaunchTargetDirectory
cmake.getLaunchTargetFileName
Do these work for you? Re-opening this issue until this is confirmed.
cmake.getLaunchTargetPath
cmake.getLaunchTargetDirectory
cmake.getLaunchTargetFileName
Do these work for you? Re-opening this issue until this is confirmed.
Thank you for re-opening. I am aware of those, but as stated in the initial post, these three values have extensions (.exe) and paths added and are not the same value as the target name.
The idea is the have an equivalent to cmake.buildTargetName
which exposes the selected launch target name not its underlaying file name.
@hwmaier Got it, thanks for the additional information.
This is a feature request.
Currently a list of CMake variables are available for command substitution in task commands, for example cmake.buildTargetName. Refer to https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-settings.md
While the build target name is exposed as substitution, the corresponding debug target name is not.
It would be beneficial to add a substitution for
getLaunchTarget
so the current debug target name is also available and can be consumed in tasks. This is very useful to support utility targets like code signing or embedded flash programming.Please note, the getLaunchTargetFilename (equivalent to CMake API
nameOnDisk
) is already exposed, but this is a different value than the itself launchTarget (CMake API valuename
) and has the file extension .exe or .elf appended.