Skip to content

Commit c2ce413

Browse files
committed
Support VS2022 preview in 1kiss.ps1, #2282
1 parent 364ce82 commit c2ce413

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

1k/1kiss.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ function find_vs() {
818818

819819
# refer: https://learn.microsoft.com/en-us/visualstudio/install/workload-and-component-ids?view=vs-2022
820820
$require_comps = @('Microsoft.VisualStudio.Component.VC.Tools.x86.x64', 'Microsoft.VisualStudio.Product.BuildTools')
821-
$vs_installs = ConvertFrom-Json "$(&$VSWHERE_EXE -version $required_vs_ver.TrimEnd('+') -format 'json' -requires $require_comps -requiresAny)"
821+
$vs_installs = ConvertFrom-Json "$(&$VSWHERE_EXE -version $required_vs_ver.TrimEnd('+') -format 'json' -requires $require_comps -requiresAny -prerelease)"
822822
$ErrorActionPreference = $eap
823823

824824
if ($vs_installs) {
@@ -2026,12 +2026,12 @@ if (!$setupOnly) {
20262026
if (($cmake_generator -eq 'Xcode') -and !$BUILD_ALL_OPTIONS.Contains('--verbose')) {
20272027
$forward_options += '--', '-quiet'
20282028
}
2029-
$1k.println("cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS")
20302029

20312030
if ($options.t) { $cmake_target = $options.t }
20322031
if ($cmake_target) {
20332032
$cmake_targets = $cmake_target.Split(',') | Sort-Object | Get-Unique
20342033
foreach ($target in $cmake_targets) {
2034+
$1k.println("cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS --target $target")
20352035
cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS --target $target $forward_options | Out-Host
20362036
if (!$?) {
20372037
Set-Location $stored_cwd
@@ -2040,6 +2040,7 @@ if (!$setupOnly) {
20402040
}
20412041
}
20422042
else {
2043+
$1k.println("cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS")
20432044
cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS $forward_options | Out-Host
20442045
if (!$?) {
20452046
Set-Location $stored_cwd

0 commit comments

Comments
 (0)