From b11840a836e89290b4a150b9c13a9ead5c5eb40a Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 23 Feb 2025 21:30:48 +0800 Subject: [PATCH] Improve build system, support select msvc toolset version Two format: - toolset with specified version `-cc msvc-14.39` - platform toolset name `-cc msvc-140` --- 1k/1kiss.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/1k/1kiss.ps1 b/1k/1kiss.ps1 index f60a358fabd..b37fc0b3d32 100644 --- a/1k/1kiss.ps1 +++ b/1k/1kiss.ps1 @@ -1522,8 +1522,10 @@ function preprocess_win() { $vs_ver = [VersionEx]$Global:VS_INST.installationVersion if ($vs_ver -ge [VersionEx]'16.0') { $outputOptions += '-A', $arch - if ($TOOLCHAIN_VER) { + if ($TOOLCHAIN_VER -match '^\d+$') { $outputOptions += "-Tv$TOOLCHAIN_VER" + } elseif($TOOLCHAIN_VER -match '^\d+\.\d+$') { + $outputOptions += '-T', "version=$TOOLCHAIN_VER" } } else {