-
Notifications
You must be signed in to change notification settings - Fork 1.7k
cleanup: support CMake >= 3.10 #1544
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
Conversation
endif() | ||
endforeach() | ||
# Require CMake 3.10. If available, use the policies up to CMake 3.22. | ||
cmake_minimum_required (VERSION 3.10...3.22) |
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.
https://google.github.io/benchmark/dependencies.html is pretty clear about why we support 3.16.3
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.
I guess I am asking you to reconsider. A number of other Google projects are perfectly capable of making forward progress (AFAICT that is the why in that document) while supporting CMake >= 3.10. And it is not like this project was using any CMake > 3.16 features. In fact, it seems this project uses more CMake < 3.0 idioms than CMake >= 3 idioms.
In any case, this is your project. If you cannot support CMake 3.10, we will just have to keep using the older versions.
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.
@dmah42 I also think this policy may be worth reconsidering. Abseil, Protobuf, and gRPC (among others) have published a C++ support policy that allows us to move forward while also allowing each project to remain compatible with eachother. More and more Google projects are adopting these policies. I think it would be good if Google benchmark considering following suite.
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.
i didn't intend this to be the end of the conversation. it was a little brusque (sorry) but my intent was to ensure that we understand the implications of opening up to older cmake versions.
i remember we had to go past 3.7 to support some features at some point, but we may have just skipped right over 3.10.
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.
Thanks @dmah42 ! I'll let @coryan follow up w/ the PR, but I wanted to also point out that at the top of https://opensource.google/documentation/policies/cplusplus-support there's a link to this table, which lists the specific versions of things that we support. It makes it a bit easier to see which versions the policies implies. In this case, we can see that the table is showing CMake >= 3.10, which is where Carlos was getting these versions.
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.
yep, i saw. i think we might want to just point at this rather than track our own dependencies, as long as we're true to it (as in my other comment).
Closing for now. If you change your mind let me know and I will gladly send the PR again. |
seems like it works so sure.. can we update the dependencies.md doc to point to the C++ support policy (or the README to point to it instead of the dependencies doc, if it's completely subsumed)? |
I looked into the CI failure, and I am not sure how it could be related to this change. But do let me know if I should look further or you have suggestions for fixes. |
Also, if you want any other changes in the PR do let me know too. |
I think this change makes sense, and I'm OK going appropriately backwards in our support here because the support policy of these other projects should be our support policy as well. Could this PR add a pointer to the support policy of the other projects mentioned in the discussion, preferably Googletests', as well as a statement affirming that we plan to follow said policy as well. |
@EricWF I do not believe googletest has changed their README file to state what is their support policy (whether that means they have not adopted the OSS Foundations policy or not, I could not say). I think Abseil has, and we both know those teams are closely related. Is that enough? If so, I am happy to edit /docs/dependencies.md, or any other |
yes please update docs/dependencies.md to point to the policy for CMake. thanks. the CI failure is not you. |
This aligns the project with the CMake support policies in: https://opensource.google/documentation/policies/cplusplus-support I also simplied the management of CMake policies. Most of the overriden policies (anything <= CMP0067) are enabled by default when you require CMake >= 3.10. But it is easier to just declare that you will accept newer policies when they are available using the `...3.22` notation.
Done. And rebased. |
thanks! |
Is there a CI entry to ensure that cmake-3.10 actually works for us? |
This aligns the project with the CMake support policies in:
https://opensource.google/documentation/policies/cplusplus-support
I also simplied the management of CMake policies. Most of the overriden policies (anything <= CMP0067) are enabled by default when you require CMake >= 3.10. But it is easier to just declare that you will accept newer policies when they are available using the
...3.22
notation.Part of the work for #1509