Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake >=2.27 - migrate from FindPythonInterp and FindPythonLibs to FindPython #3211

Closed
XVilka opened this issue Aug 2, 2023 · 3 comments · Fixed by #3363
Closed

CMake >=2.27 - migrate from FindPythonInterp and FindPythonLibs to FindPython #3211

XVilka opened this issue Aug 2, 2023 · 3 comments · Fixed by #3363
Assignees
Milestone

Comments

@XVilka
Copy link
Member

XVilka commented Aug 2, 2023

These modules have been deprecated since CMake 3.12

CMake Warning (dev) at CMakeLists.txt:96 (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.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /opt/homebrew/bin/python3.11 (found version "3.11.4")
CMake Warning (dev) at CMakeLists.txt:97 (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.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonLibs: /opt/homebrew/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib (found suitable version "3.11.4", minimum required is "3.5")
CMake Warning at CMakeLists.txt:157 (message):
  KSyntaxHighlighting has been disabled because not supported in QT6

https://cmake.org/cmake/help/latest/policy/CMP0148.html

https://repology.org/project/cmake/versions

Currently the complete migration stopped by Ubuntu 18.04 - it has CMake 3.10.2. Bionic reached EOL already though, but still on extended support: https://endoflife.date/ubuntu

See also #2509

@r3yc0n1c
Copy link

Hi, I'd like to work on this!

@karliss
Copy link
Member

karliss commented Mar 19, 2024

Please don't do this right now.

@karliss
Copy link
Member

karliss commented Jun 3, 2024

The changes will be include as part of rizinorg/cutter-deps#15 . Cmake <3.12 will be kept by cmake version check, the amount of conditional logic wasn't too bad.

Overall the new modules are easier to use and configure and make the CI config simpler since they require only specifying -DPython[3]_ROOT_DIR in comparison with old one which required PYTHON_LIBRARY PYTHON_INCLUDE_DIR PYTHON_EXECUTABLE. Not only that's 3 times less paths, you don't need to be as concerned with platform specific file paths within the root. It's also the mechanism pyside cmake files use for looking up python.

@karliss karliss self-assigned this Jun 3, 2024
@karliss karliss mentioned this issue Jul 14, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants