This is an automated email from the ASF dual-hosted git repository.

hsluoyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/casbin-cpp.git


The following commit(s) were added to refs/heads/master by this push:
     new 71ec5cb  fix: fix Windows CI build failures (#273)
71ec5cb is described below

commit 71ec5cb619aa3d97ff6ec0eb06f435731aea4ddf
Author: Ziyang Dong <[email protected]>
AuthorDate: Fri Aug 7 16:47:23 2026 +0800

    fix: fix Windows CI build failures (#273)
---
 .github/workflows/ci.yml | 2 ++
 setup.py                 | 1 +
 2 files changed, 3 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 35c0fde..afda296 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -61,6 +61,8 @@ jobs:
         uses: jwlawson/actions-setup-cmake@v2
         with:
           cmake-version: '3.25.x'
+      - name: Set up MSVC environment
+        uses: ilammy/msvc-dev-cmd@v1
       - name: Configuring CMake files
         id: building-files
         run: |
diff --git a/setup.py b/setup.py
index 46be287..b3bd835 100644
--- a/setup.py
+++ b/setup.py
@@ -46,6 +46,7 @@ class CMakeBuild(build_ext):
             f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}",
             f"-DPYTHON_EXECUTABLE={sys.executable}",
             f"-DCMAKE_BUILD_TYPE={cfg}",  # not used on MSVC, but no harm
+            "-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
         ]
         build_args = []
         # Adding CMake arguments set as environment variable


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to