Skip to content

Fix cmake warning#3255

Merged
ratkosrb merged 1 commit intovmangos:developmentfrom
Stoabrogga:cmake
Mar 14, 2026
Merged

Fix cmake warning#3255
ratkosrb merged 1 commit intovmangos:developmentfrom
Stoabrogga:cmake

Conversation

@Stoabrogga
Copy link
Copy Markdown
Contributor

🍰 Pullrequest

Fix this warning:

CMake Warning (dev) at /usr/share/cmake-3.31/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(zstd) is deprecated, call
  FetchContent_MakeAvailable(zstd) instead.  Policy CMP0169 can be set to OLD
  to allow FetchContent_Populate(zstd) to be called directly for now, but the
  ability to call it with declared details will be removed completely in a
  future version.
Call Stack (most recent call first):
  dep/cpptrace/CMakeLists.txt:431 (FetchContent_Populate)
This warning is for project developers.  Use -Wno-dev to suppress it.

Related commit:
efa0d8b (PR #3199)

Proof

None

Issues

None

How2Test

I used Cmake 3.31.6 on Debian 13:

mkdir ~/vmangos/build
cd ~/vmangos/build
cmake ~/vmangos/core -DCMAKE_C_FLAGS="-w" -DCMAKE_CXX_FLAGS="-w" -DUSE_PCH=OFF -DUSE_STD_MALLOC=1 -DUSE_EXTRACTORS=0 -DCMAKE_INSTALL_PREFIX=~/vmangos-srv -DCMAKE_BUILD_TYPE=Release

Todo / Checklist

None

@ratkosrb ratkosrb merged commit 5c9c227 into vmangos:development Mar 14, 2026
3 checks passed
@Stoabrogga Stoabrogga deleted the cmake branch March 15, 2026 11:33
@GrenderG
Copy link
Copy Markdown
Collaborator

Maybe a better approach could be found to still keep support for older cmake versions, @Stoabrogga. That way we can honor:

cmake_minimum_required(VERSION 3.12)

@0blu
Copy link
Copy Markdown
Collaborator

0blu commented Apr 19, 2026

We could upgrade to 3.13.5 it's the last Windows XP supported version

https://cmake.org/files/v3.13/cmake-3.13.5-win32-x86.zip

Edit: I made a typo and wrote 3.15 instead of 3.13

@GrenderG
Copy link
Copy Markdown
Collaborator

Is FetchContent_MakeAvailable(zstd) supported in that version?

@Stoabrogga
Copy link
Copy Markdown
Contributor Author

Is FetchContent_MakeAvailable(zstd) supported in that version?

Hmm, the last cmake version which supports Windows XP is 3.13.5, not 3.15.5. They dropped support for Windows XP in 3.14:
https://cmake.org/cmake/help/latest/release/3.14.html#deprecated-and-removed-features

FetchContent_MakeAvailable needs at least 3.14:
https://cmake.org/cmake/help/latest/module/FetchContent.html#command:fetchcontent_makeavailable

@ratkosrb
Copy link
Copy Markdown
Contributor

Does this need to be reverted then?

@Stoabrogga
Copy link
Copy Markdown
Contributor Author

Perhaps both ways can be implemented, one for cmake < 3.14, and one for cmake >= 3.14. I'll take a look on this.

@Stoabrogga Stoabrogga mentioned this pull request Apr 19, 2026
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.

4 participants