Skip to content

Commit c27aae9

Browse files
authored
Resolve pybind11 CMake message (#2614)
This PR silences the message > Using compatibility mode for Python, set PYBIND11_FINDPYTHON to NEW/OLD to silence this message The message is gone when `find_package(Python REQUIRED COMPONENTS Development.Module)` is done before fetching pybind11, as `Python_FOUND` will be set.
1 parent 536d260 commit c27aae9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
### Changed
1212

13+
* Silenced `pybind11` CMake message due to using compatibility mode for Python [#2614](https://github.com/IntelPython/dpnp/pull/2614)
14+
1315
### Deprecated
1416

1517
### Removed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ endif()
4949

5050
include(GNUInstallDirs)
5151

52+
# find Python before enabling pybind11
53+
find_package(Python REQUIRED COMPONENTS Development.Module NumPy)
54+
5255
# Fetch pybind11
5356
include(FetchContent)
5457
FetchContent_Declare(
@@ -59,8 +62,6 @@ FetchContent_Declare(
5962
)
6063
FetchContent_MakeAvailable(pybind11)
6164

62-
find_package(Python REQUIRED COMPONENTS Development.Module NumPy)
63-
6465
set(CYTHON_FLAGS "-t -w \"${CMAKE_SOURCE_DIR}\"")
6566
find_package(Cython REQUIRED)
6667

0 commit comments

Comments
 (0)