vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

buildKitVendor etc.. expansion for clang-cl support

Open wchou158 opened this issue 5 months ago • 3 comments

This changes user-visible behavior

The following changes are proposed:

  • Added "ClangCl" to the CompilerVendorEnum type
  • Enhanced vendor detection to identify Clang-cl kits by name
  • Updated version detection to treat ClangCl the same as Clang (reusing the same regex)
  • Fixed variable expansion for ${buildKitVendor}, ${buildKitVersionMajor}, etc., when using clang-cl-based kits on Windows

The purpose of this change

When using a clang-cl toolchain on Windows, variables like ${buildKitVendor} and ${buildKitVersionMajor} did not expand correctly in user-defined build directory paths. For example, with Cmake: Build Directory set to

${workspaceFolder}/build-${buildKitHostOs}-${buildKitVendor}${buildKitVersionMajor}-${buildKitTargetArch}-${buildType}

Before:

[cmake] -- Build files have been written to: C:/svn/myApp/build-win32-__unknown_vendor__0-unknown-Debug

After this change:

[cmake] -- Build files have been written to: C:/svn/myApp/build-win32-ClangCl20-x64-Debug

wchou158 avatar Jul 23 '25 23:07 wchou158

Could you add a changelog update? In a new 1.22 section. Thanks!

gcampbell-msft avatar Aug 12 '25 10:08 gcampbell-msft

@microsoft-github-policy-service agree

wchou158 avatar Aug 18 '25 02:08 wchou158

@wchou158 rebase and squash into a single commit

lygstate avatar Nov 26 '25 08:11 lygstate