From c377703b2b6cd57c826f1a61283acc6a522bdb37 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 24 Jan 2024 17:40:48 +0100 Subject: [PATCH] Use pybind11's new mode to work around CMP0148 related dev warning. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a42d77976..85855e4f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,10 @@ FetchContent_Declare( GIT_REPOSITORY https://github.com/pybind/pybind11.git GIT_TAG v2.11.1 ) +# TODO: Revisit once we get a new pybind11 release +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.27) + set(PYBIND11_FINDPYTHON ON) +endif() FetchContent_MakeAvailable(pybind11-src) endif()