Skip to content

Commit 91f6d21

Browse files
authored
Do not call find_package(pybind11 QUIET) if IDYNTREE_USES_PYTHON_PYBIND11 is OFF
Calling find_package(pybind11) can create configuration failures even if the QUIET option is passed (see #876). As at the moment there is not automatic detection of pybind11 to enable the pybind11 bindings, it is just easier to properly search for pybind11 if IDYNTREE_USES_PYTHON_PYBIND11 is ON, and do not do anything otherwise. Fix related to #876 .
1 parent 8bf1795 commit 91f6d21

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

bindings/CMakeLists.txt

+2-6
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,9 @@ endif()
9797

9898

9999
option(IDYNTREE_USES_PYTHON_PYBIND11 "Create iDynTree Python bindings using pybind11" FALSE)
100-
find_package(pybind11 QUIET)
101100
if (IDYNTREE_USES_PYTHON_PYBIND11)
102-
if (${pybind11_FOUND})
103-
add_subdirectory(pybind11)
104-
else()
105-
MESSAGE(FATAL_ERROR "pybind11 not found, impossible to generate iDynTree pybind11 bindings.")
106-
endif()
101+
find_package(pybind11 REQUIRED)
102+
add_subdirectory(pybind11)
107103
endif()
108104

109105
# Install main __init__.py file.

0 commit comments

Comments
 (0)