From 3eb49eb45aa9034f81691b060d3fe984e7192977 Mon Sep 17 00:00:00 2001 From: Frank Richter Date: Sun, 24 Nov 2024 14:37:59 +0100 Subject: [PATCH] Run vcvars64.bat before CMake --- .github/workflows/cmake-multi-platform.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index c1d15bb..9b68fca 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -37,14 +37,17 @@ jobs: run: > choco install ninja + # C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat + - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > - cmake -B ${{ steps.strings.outputs.build-output-dir }} - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -G "${{ matrix.generator }}" - -S ${{ github.workspace }} + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + && cmake -B ${{ steps.strings.outputs.build-output-dir }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -G "${{ matrix.generator }}" + -S ${{ github.workspace }} - name: Build # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).