Skip to content

Commit

Permalink
Support VS2022 preview in 1kiss.ps1, #2282
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Dec 20, 2024
1 parent 364ce82 commit c2ce413
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 1k/1kiss.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ function find_vs() {

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

if ($vs_installs) {
Expand Down Expand Up @@ -2026,12 +2026,12 @@ if (!$setupOnly) {
if (($cmake_generator -eq 'Xcode') -and !$BUILD_ALL_OPTIONS.Contains('--verbose')) {
$forward_options += '--', '-quiet'
}
$1k.println("cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS")

if ($options.t) { $cmake_target = $options.t }
if ($cmake_target) {
$cmake_targets = $cmake_target.Split(',') | Sort-Object | Get-Unique
foreach ($target in $cmake_targets) {
$1k.println("cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS --target $target")
cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS --target $target $forward_options | Out-Host
if (!$?) {
Set-Location $stored_cwd
Expand All @@ -2040,6 +2040,7 @@ if (!$setupOnly) {
}
}
else {
$1k.println("cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS")
cmake --build $BUILD_DIR $BUILD_ALL_OPTIONS $forward_options | Out-Host
if (!$?) {
Set-Location $stored_cwd
Expand Down

0 comments on commit c2ce413

Please sign in to comment.