Skip to content

Commit 2ec4c59

Browse files
committed
Resolve a cmake warning
1 parent 536d260 commit 2ec4c59

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)