CMake version must be newer than 3.11
ssr-yuki opened this issue · 1 comments
Hi. I found that this software requires CMake newer than 3.11 for the python binding.
As shown below, in building the python binding, CMake uses FetchContent
module.
robotoc/bindings/python/CMakeLists.txt
Lines 1 to 10 in c10714e
While this FetchContent
module appears after version 3.11 (please see the 5th content of the CMake 3.11 Release Notes / Modules), the version requirement is still >=3.1.
Line 1 in c10714e
I recommend you to set the minimum required version to 3.11 or higher
In my environment (Ubuntu 18.04 + default CMake (3.10.2)), a CMake error occurs (the error message is shown below), and updating CMake to the latest (3.22.2) resolves it.
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DOPTIMIZE_FOR_NATIVE=ON
-- pinocchio FOUND. pinocchio at /opt/openrobots/lib/libpinocchio.so
-- boost_filesystem FOUND. boost_filesystem at /usr/lib/x86_64-linux-gnu/libboost_filesystem.so
-- boost_serialization FOUND. boost_serialization at /usr/lib/x86_64-linux-gnu/libboost_serialization.so
-- boost_system FOUND. boost_system at /usr/lib/x86_64-linux-gnu/libboost_system.so
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- filesystem
-- serialization
-- system
-- hpp-fcl FOUND. hpp-fcl at /opt/openrobots/lib/libhpp-fcl.so
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- chrono
-- serialization
-- system
-- Default C++ standard: 201402
-- C++ standard sufficient: Minimal required 11, currently defined: 11
-- C++ standard sufficient: Minimal required 11, currently defined: 11
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP: TRUE
CMake Error at bindings/python/CMakeLists.txt:1 (include):
include could not find load file:
FetchContent
CMake Error at bindings/python/CMakeLists.txt:2 (FetchContent_GetProperties):
Unknown CMake command "FetchContent_GetProperties".
-- Configuring incomplete, errors occurred!
References: CMake error "include could not find load file: FetchContent" - stackoverflow
Thank you for reporting the issue.
It is a title a bit curious for me because CI for Ubuntu 18.04 passes with python bindings. (CMake is installed with build-essentials
. Perhaps it is newer than the default CMake version for Ubuntu 18.04.)
Anyway, I'll consider replacing FetchContent
with submodule
of pybind11.