gemrb icon indicating copy to clipboard operation
gemrb copied to clipboard

Fix the cmake warning (CMP0148)

Open K1ngst0m opened this issue 1 year ago • 5 comments

Description

According to the cmake policy CMP0148:

FindPythonLibs have been deprecated since CMake 3.12. So we should update to use the new FindPython.

Checklist

  • [X] Commit messages are descriptive and explain the rationale for changes
  • [X] I used the same coding style as the surrounding code
  • [X] I have tested the proposed changes
  • [X] I extended the documentation, if necessary
  • [X] The proposed change builds also on our build bots (check after submission)

K1ngst0m avatar Jan 13 '24 03:01 K1ngst0m

Thanks. Please also bump the minimum version to 3.12 then, since it appears FindPython is only available from that point onward.

Something goes wrong on windows:

-- Could NOT find Python (missing: Development Development.Module Development.Embed) (found suitable version "3.12", minimum required is "3")

lynxlynxlynx avatar Jan 13 '24 06:01 lynxlynxlynx

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Jan 14 '24 15:01 sonarqubecloud[bot]

VCPKG is versioned and we use a snapshot, so the py version shouldn't matter. The problem is somewhere between cmake and the host. Since 3.12 is on the host, I bet it's being picked up, but with just the runtime available, thus failing the requirement. So we need a different way to enforce the found version — before we used that version define to short-circuit multiple version problems.

lynxlynxlynx avatar Jan 14 '24 15:01 lynxlynxlynx

You can try with a ranged version: https://cmake.org/cmake/help/latest/command/find_package.html#basic-signature

Something like -DPYTHON_VERSION="3.10<3.11".

lynxlynxlynx avatar Jan 14 '24 15:01 lynxlynxlynx

Any plans on completing this work?

lynxlynxlynx avatar Feb 18 '24 11:02 lynxlynxlynx

Thanks. Please also bump the minimum version to 3.12 then, since it appears FindPython is only available from that point onward.

Something goes wrong on windows:

-- Could NOT find Python (missing: Development Development.Module Development.Embed) (found suitable version "3.12", minimum required is "3")

I checked https://vcpkg.io/en/packages And it looks like: image (also here: https://github.com/microsoft/vcpkg/issues/36735)

So @K1ngst0m you can update python at most to 3.11.5.

czarny247 avatar Mar 04 '24 14:03 czarny247

This is not about bumping the python version though. And the minimum cmake one was already sufficiently bumped in a different PR, so that part is not relevant any more.

lynxlynxlynx avatar Mar 04 '24 14:03 lynxlynxlynx

Closing in favour of #2070

lynxlynxlynx avatar Mar 25 '24 20:03 lynxlynxlynx