From 5e7091c22338b5d434c42d9b26e4ba8a3bf894b3 Mon Sep 17 00:00:00 2001 From: Mark Schofield <34426337+MarkSchofield@users.noreply.github.com> Date: Thu, 5 Feb 2026 21:17:37 -0800 Subject: [PATCH] Add vs2026 presets; use the 'windows-2025-vs2026' runner image --- .github/workflows/ci.yaml | 6 +++--- example/CMakeLists.txt | 11 ++++------- example/CMakePresets.json | 35 +++++++++++++++++++++++++++++++++++ example/build.ps1 | 6 ++++-- 4 files changed, 46 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5c3fcc3..64f35be 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,14 +42,14 @@ jobs: - windows-ninja-clang-x64 - windows-ninja-clangcl-x64 - windows-fastbuild-msvc-x64 - - windows-vs2022-x64 - - windows-vs2022-arm64 + - windows-vs2026-x64 + - windows-vs2026-arm64 include: - buildPreset: windows-ninja-msvc-x64 cuda: true - buildPreset: windows-fastbuild-msvc-x64 fastbuild: true - runs-on: windows-latest + runs-on: windows-2025-vs2026 steps: - name: Checkout uses: actions/checkout@v6 diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index c259a0a..8d54afe 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.20) if(DEFINED ENV{CUDA_PATH}) set(CMAKE_CUDA_COMPILER "$ENV{CUDA_PATH}/bin/nvcc.exe") + set(CMAKE_CUDA_FLAGS_INIT "${CMAKE_CUDA_FLAGS_INIT} -allow-unsupported-compiler") endif() project(WindowsToolchainExample) @@ -39,14 +40,10 @@ add_subdirectory(SharedLibrary) add_subdirectory(WindowsApplication) if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND (CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64) AND (NOT EWDK)) - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.50) - message(WARNING "NVIDIA Cuda Toolkit support requires MSVC toolset version less than 19.50 - skipping Cuda example project.") + if(NOT (DEFINED ENV{CUDA_PATH})) + message(WARNING "NVIDIA Cuda Toolkit not found - please make sure that the 'CUDA_PATH' environment variable is set.") else() - if(DEFINED ENV{CUDA_PATH}) - add_subdirectory(CommandLineCuda) - else() - message(WARNING "NVIDIA Cuda Toolkit not found - please make sure that the 'CUDA_PATH' environment variable is set.") - endif() + add_subdirectory(CommandLineCuda) endif() endif() diff --git a/example/CMakePresets.json b/example/CMakePresets.json index d50f157..13a3728 100644 --- a/example/CMakePresets.json +++ b/example/CMakePresets.json @@ -169,6 +169,33 @@ "CMAKE_SYSTEM_PROCESSOR": "ARM64" } }, + { + "name": "windows-vs2026", + "inherits": "windows", + "hidden": true, + "generator": "Visual Studio 18 2026", + "cacheVariables": { + "CMAKE_SYSTEM_NAME": "Windows" + } + }, + { + "name": "windows-vs2026-x64", + "inherits": "windows-vs2026", + "hidden": false, + "cacheVariables": { + "CMAKE_GENERATOR_PLATFORM": "x64,version=10.0.26100.0", + "CMAKE_SYSTEM_PROCESSOR": "AMD64" + } + }, + { + "name": "windows-vs2026-arm64", + "inherits": "windows-vs2026", + "hidden": false, + "cacheVariables": { + "CMAKE_GENERATOR_PLATFORM": "ARM64,version=10.0.26100.0", + "CMAKE_SYSTEM_PROCESSOR": "ARM64" + } + }, { "name": "linux-windows", "inherits": ["default"], @@ -255,6 +282,14 @@ "name": "windows-vs2022-arm64", "configurePreset": "windows-vs2022-arm64" }, + { + "name": "windows-vs2026-x64", + "configurePreset": "windows-vs2026-x64" + }, + { + "name": "windows-vs2026-arm64", + "configurePreset": "windows-vs2026-arm64" + }, { "name": "linux-windows-ninja-clang-arm64", "configurePreset": "linux-windows-ninja-clang-arm64" diff --git a/example/build.ps1 b/example/build.ps1 index a43e04e..954edf8 100644 --- a/example/build.ps1 +++ b/example/build.ps1 @@ -7,8 +7,10 @@ param ( [ValidateSet('windows-ninja-msvc-x64', 'windows-ninja-msvc-x64-spectre', 'windows-ninja-msvc-x86', 'windows-ninja-msvc-arm64', 'windows-ninja-msvc-host', 'windows-ninja-clang-x64', - 'windows-ninja-clangcl-x64', 'windows-fastbuild-msvc-x64', 'windows-vs2022-x64', - 'windows-vs2022-arm64')] + 'windows-ninja-clangcl-x64', 'windows-fastbuild-msvc-x64', + 'windows-vs2022-x64', 'windows-vs2022-arm64', + 'windows-vs2026-x64', 'windows-vs2026-arm64' + )] $Presets = @('windows-ninja-msvc-host'), [ValidateSet('Debug', 'Release', 'RelWithDebInfo')]