CMake 4.0 removed compatibility for versions older than 3.5
Using cmake 4.0 results in a build error:
CMake Error at lib/edd-dbg/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features
Created a separate issue for Zenkit https://github.com/GothicKit/ZenKit/issues/103.
I've checked modules that we have so far:
- lib/edd-dbg - can fix locally. Long term we can move to std::stacktrace.
- bullet3 - even on their github it still 2.4.3
- squish/zlib in Tempest
- multiple entries in ZenKit
We could add DCMAKE_POLICY_VERSION_MINIMUM=3.5 like Zenkit does now or add a comment to readme about it.
https://github.com/GothicKit/ZenKit/commit/215c6f8f5b2ee8a7895b12a888639173f86c60d2
I've updated most of third-party dependencies of Tempest and OpenGothic. TODO:
- ZenKit (https://github.com/GothicKit/ZenKit/issues/103)
- Tempest/thirdparty/libpng - they have it fixed in newest version, but it fails to compile into static-library
We could add DCMAKE_POLICY_VERSION_MINIMUM=3.5 like Zenkit does now or add a comment to readme about it.
I do not see much benefit in adding this into Readme, probably it's best to have a real fix
ZenKit's issue is now resolved. Can you bump the submodule now please?
Hi, @azahi !
I'll update submodule later this week or in beginning of next one
Tested new ZenKit today:
C:/Programming/OpenGothic/lib/ZenKit/include/zenkit/Stream.hh:220:47: error: implicit conversion changes signedness: 'ssize_t' (aka 'long long') to 'unsigned long long' [-Werror,-Wsign-conversion]
220 | auto len = static_cast<ssize_t>(w->tell()) - size_off - sizeof(uint32_t);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ ~
C:/Programming/OpenGothic/lib/ZenKit/include/zenkit/Stream.hh:223:12: error: implicit conversion changes signedness: 'unsigned long long' to 'ssize_t' (aka 'long long') [-Werror,-Wsign-conversion]
223 | w->seek(len, Whence::CUR);
| ~~~~ ^~~
2 errors generated.
@lmichaelis can you add cast of sizeof(uint32_t) to ssize_t ?
Hey @Try, I've added the requested change (https://github.com/GothicKit/ZenKit/commit/8c4edf75ebdda1fa27c863f5fae81b3744f7187f) but am unable to verify if it will work for you. Could you tell me which compiler/version this happens on?
@lmichaelis Commit https://github.com/GothicKit/ZenKit/commit/8c4edf75ebdda1fa27c863f5fae81b3744f7187f) works, thanks!
Could you tell me which compiler/version this happens on?
I'm using at the moment LLVM-MinGW 17.0.6 64-bit - one that comes bundled with QtCreator, on windows. I principle any MinGW/GCC has similar warning for mixing sign and unsigned types. And, ofc OpenGothic compiled with -WError.
@azahi Sumbmodule is updated now.