-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update cmake minimum version range for build with cmake 4.0 #246
Conversation
Confirmed that this fixes build with wsrep-lib using cmake-4.0.0 and allows MariaDB to build correctly. https://jira.mariadb.org/browse/MDEV-36422. MariaDB is using wsrep-lib as a submodule at https://github.com/MariaDB/server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding maximum supported version would cause a need fix supported range several times of a year. Minimum required may not be changed on GA-releases so is there some other better way to do this ?
Background - 3.5 is from 2016 and 3.10 from 2018 the max is actually policy_max. Not max cmake version. It means the the policies / contents in the CmakeLists are conformant to that version of cmake. Which they seem to be on doing the compile. cmake 4.0.0 warns that cmake 3.5 files will be deprecated. Whilst cmake 3.10 files do not warn. setting to Ref: https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html |
Hi @heitbaum , thanks for the explanation. Seems that it should be safe to add 4.0 as policy_max. What comes to minimum version, it is better to leave as it is for now. While cmake 2.8 is an ancient version, we cannot completely rule out that it would not be in use in some builder. @fundawang Please add your name and email in CONTRIBUTORS.txt. |
👍 @temeo I haven’t been changing the min=2.8 in the patches that I have been doing - except when there has been need to rewrite some of the cmake code using later features - this was only in the 2.6 case. So I would agree - just keep with 2.8 in wsrep-lib. |
Which means, at least cmake 2.8 is required, but the code also compiles without problems if building with policies defined by cmake 4.0.
Which means, at least cmake 2.8 and policies defined by cmake 2.8 are both required. cmake 4.0 disabled policies default values prior to 3.5, so building with cmake 4.0 failed.
Never mind, it is just a small patch. |
Hi, The corresponding change was pushed in 324b01e, I'll close this one. Thanks! |
compatibility for cmake < 3.5 was removed in cmake 4.0. Adding version range to make it build with cmake 4.0