From e5d3a6e5b0733a960f2bfaf3d1bfdccc9c0db794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 1 Jan 2026 23:07:17 +0100 Subject: [PATCH] package/ci: work around too new CMake used with old pybind11 on Windows. Eventually I should probably bump the min version to something newer than 2.3, but the min version is bumped to CMake 3.5 only in 2.11 that got released in 2023. That's too new. --- package/ci/appveyor-desktop-gles.bat | 10 ++++++++-- package/ci/appveyor-desktop.bat | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/package/ci/appveyor-desktop-gles.bat b/package/ci/appveyor-desktop-gles.bat index f778a62..eaf97ad 100644 --- a/package/ci/appveyor-desktop-gles.bat +++ b/package/ci/appveyor-desktop-gles.bat @@ -3,11 +3,15 @@ if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2019" call "C:/Program File if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" call "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvarsall.bat" x64 || exit /b set PATH=%APPVEYOR_BUILD_FOLDER%\deps\bin;%PATH% -rem Build pybind11. Downloaded in the appveyor.yml script. +rem Build pybind11. Downloaded in the appveyor.yml script. Forcing +rem -DCMAKE_POLICY_VERSION_MINIMUM=3.5 because it's bumped from 3.4 to 3.5 only +rem in version 2.11, which got released in 2023, years after the MSVC versions +rem we test for. cd pybind11-%PYBIND% || exit /b mkdir -p build && cd build || exit /b cmake .. ^ -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ^ -DPYBIND11_PYTHON_VERSION=3.%PYTHON% ^ -DPYBIND11_TEST=OFF ^ -G Ninja || exit /b @@ -94,11 +98,13 @@ cmake --build . || exit /b cmake --build . --target install || exit /b cd .. && cd .. -rem Build +rem Build. Again forcing -DCMAKE_POLICY_VERSION_MINIMUM=3.5 because the +rem pybind11 CMake config files also require just 3.4 now. mkdir build && cd build || exit /b cmake .. ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ^ -DPYBIND11_PYTHON_VERSION=3.%PYTHON% ^ -DMAGNUM_WITH_PYTHON=ON ^ -DMAGNUM_BUILD_TESTS=ON ^ diff --git a/package/ci/appveyor-desktop.bat b/package/ci/appveyor-desktop.bat index 92048ca..bfebdec 100644 --- a/package/ci/appveyor-desktop.bat +++ b/package/ci/appveyor-desktop.bat @@ -15,11 +15,15 @@ if "%COMPILER%" == "msvc-clang" if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual St set EXCEPT_MSVC2017=ON IF "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" set EXCEPT_MSVC2017=OFF -rem Build pybind11. Downloaded in the appveyor.yml script. +rem Build pybind11. Downloaded in the appveyor.yml script. Forcing +rem -DCMAKE_POLICY_VERSION_MINIMUM=3.5 because it's bumped from 3.4 to 3.5 only +rem in version 2.11, which got released in 2023, years after the MSVC versions +rem we test for. cd pybind11-%PYBIND% || exit /b mkdir -p build && cd build || exit /b cmake .. ^ -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ^ -DPYBIND11_PYTHON_VERSION=3.%PYTHON% ^ -DPYBIND11_TEST=OFF ^ -G Ninja || exit /b @@ -104,12 +108,14 @@ cmake --build . || exit /b cmake --build . --target install || exit /b cd .. && cd .. -rem Build +rem Build. Again forcing -DCMAKE_POLICY_VERSION_MINIMUM=3.5 because the +rem pybind11 CMake config files also require just 3.4 now. mkdir build && cd build || exit /b cmake .. ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^ -DCMAKE_PREFIX_PATH=%APPVEYOR_BUILD_FOLDER%/SDL ^ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ^ -DPYBIND11_PYTHON_VERSION=3.%PYTHON% ^ -DMAGNUM_WITH_PYTHON=ON ^ -DMAGNUM_BUILD_TESTS=ON ^