Skip to content

Commit c3c0688

Browse files
committed
Use pybind11 FindPython
1 parent 424588b commit c3c0688

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ jobs:
5858
sudo apt update
5959
sudo apt install -y build-essential gcc g++ cmake
6060
61+
- name: Set up MSVC (Windows)
62+
if: matrix.os == 'windows-latest'
63+
uses: ilammy/msvc-dev-cmd@v1
64+
6165
- name: Build and install
6266
run: |
6367
pip install . pytest

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
1010

1111
include(FetchContent)
1212

13+
# Use CMake's FindPython (not pybind11's legacy compatibility mode)
14+
set(PYBIND11_FINDPYTHON ON)
15+
1316
# --- Fetch pybind11 ---
1417
FetchContent_Declare(
1518
pybind11

0 commit comments

Comments
 (0)