zeux/meshoptimizer

CMakeList.txt fix deprecation warning from CMake.

Closed this issue · 4 comments

MeshOptimizer is specifying a min cmake this is deprecated. So this generates unneeded warning messages. Seems like a simple fix. Just need a version number higher than 3.5 to suppress this.

change:
cmake_minimum_required(VERSION 3.0)

to:
cmake_minimum_required(VERSION 3.0...3.20)

https://cmake.org/cmake/help/latest/command/cmake_policy.html#version

Changed in version 3.31: Compatibility with versions of CMake older than 3.10 is deprecated. Calls to cmake_minimum_required(VERSION) or cmake_policy(VERSION) that do not specify at least 3.10 as their policy version (optionally via ...) will produce a deprecation warning in CMake 3.31 and above.

CMake Deprecation Warning at .../meshoptimizer-src/CMakeLists.txt:1 (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.
zeux commented

The minimum version has been 3.5 since July 2023, for three consecutive releases (0.20, 0.21, 0.22).

Will need to bump to 3.10 as per above (can be max). We must be pulling an older version of meshoptimizer off github. So will update. We were on v0.19.

zeux commented

Ah, I missed the 3.31 note.

zeux commented

Fixed by a64a212