Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ByteHamster
Copy link

Compiling a project using tlx shows the following prominent warning message:

CMake Deprecation Warning at extlib/tlx/CMakeLists.txt:11 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Warning (dev) at extlib/tlx/CMakeLists.txt:19 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

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

I think cmake 3.9 should be old enough that it is available on basically every machine. Ubuntu ships cmake 3.28

@fabratu
Copy link

fabratu commented Nov 1, 2024

I would second this request. I think it safe to raise CMake to at least 3.12 in order to get a more robust package finding. Is it possible to do this?

@ByteHamster
Copy link
Author

@bingmann It would be great if this could be merged to reduce the number of warnings in projects using tlx :)

@bingmann
Copy link
Member

bingmann commented Jan 4, 2025

@bingmann It would be great if this could be merged to reduce the number of warnings in projects using tlx :)

Does this PR/these commits work for you? #63

@ByteHamster
Copy link
Author

@bingmann thanks for having a look. In the time since creating this PR, I updated to cmake 3.31. Now it complains that compatibility with cmake <3.10 will be removed in a future update. So upgrading to 3.7 does not hide the warning message anymore, unfortunately. How about using something like cmake_minimum_required(VERSION 3.7...3.31) to get the warning silenced? This syntax indicates that tlx was tested to work with 3.31, so it should be a while before that version gets deprecated. At the same time, it doesn't bump the minimum version, so it stays compatible with very old cmake versions.

@bingmann
Copy link
Member

Fixed with #63

@bingmann bingmann closed this Jan 10, 2025
@ByteHamster
Copy link
Author

Thanks!

@bingmann
Copy link
Member

Sorry this takes so long, but the CIs always need updates with such changes, and that takes longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants