-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix compatibility with CMake 4.0 #311
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
base: main
Are you sure you want to change the base?
Conversation
|
Great |
| @@ -1,4 +1,4 @@ | |||
| cmake_minimum_required(VERSION 2.8.3) | |||
| cmake_minimum_required(VERSION 2.8.3...3.5) | |||
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.
Is this enough for cmake 4? Don't we need 3.6 or higher?
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.
No, CMake 4.0.0 is still compatible with the policy of CMake 3.5 (if you check the error message, it refers to "Compatibility with CMake < 3.5", not "Compatibility with CMake <= 3.5"). This will print a warning for any CMake version >= 3.31, but I wanted to make the least possible invasive change here.
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.
Good - who can approve?
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.
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.
fyi I started a friendly fork with (among other things) CMake 4.0 support at https://github.com/ami-iit/serial_cpp, feel free to check it out.
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.
cmake_minimum_required(VERSION 3.10) fix compatibility and deprecation warning
Without this change, configuration in CMake 4.0 fails with: