ros / catkin

A CMake-based build system that is used to build all packages in ROS.
http://wiki.ros.org/catkin
BSD 3-Clause "New" or "Revised" License
321 stars 280 forks source link

Migrate away from PythonInterp CMake module #1195

Open mikepurvis opened 6 months ago

mikepurvis commented 6 months ago

Without this change, every catkin package built spams this into the log:

CMake Warning (dev) at /home/mikepurvis/roslib_ws/install/share/catkin/cmake/python.cmake:4 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  /home/mikepurvis/roslib_ws/install/share/catkin/cmake/all.cmake:164 (include)
  /home/mikepurvis/roslib_ws/install/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:3 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

The new policy for CMake 3.27 is: https://cmake.org/cmake/help/latest/policy/CMP0148.html

The replacement FindPython module has been available since CMake 3.12, released in 2.18: https://cmake.org/cmake/help/latest/module/FindPython.html

ROS Noetic's stated minimum target is the CMake on Debian Buster, which is 3.13.4: https://www.ros.org/reps/rep-0003.html#noetic-ninjemys-may-2020-may-2025