CMake config warning: Python module deprecated
Description
According to CMake documentation, the PythonInterp
module has been deprecated since version 3.12. CMake recommends using the Python3
module instead or setting policy CMP0148 to continue using the module.
Analysis
Here is the list of places where the PythonInterp
module is called :
- samples/ClientServer/CMakeLists.txt:18
- samples/embedded/cli_pubsub_server/CMakeLists.txt:11
- samples/embedded/platform_dep/CMake/CMakeLists.txt:33
- samples/PubSub_ClientServer/CMakeLists.txt:19
- src/ClientServer/frontend/pys2opc/CMakeLists.txt:28
- tests/ClientServer/CMakeLists.txt:20
- tests/PubSub/CMakeLists.txt:18
Implementation
I suggest replacing the line find_package(PythonInterp 3 REQUIRED)
by the following :
find_package(Python3 COMPONENTS Interpreter)
Edited by Thomas Bouston