Require CMake 3.12 due to introduction of FindPython3#515
Merged
clalancette merged 1 commit intoament:ironfrom Mar 3, 2024
Merged
Require CMake 3.12 due to introduction of FindPython3#515clalancette merged 1 commit intoament:ironfrom
clalancette merged 1 commit intoament:ironfrom
Conversation
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
clalancette
approved these changes
Feb 29, 2024
Contributor
Contributor
Author
Contributor
Yep, your logic makes sense. I was just double-checking with CI. With that, I'm going to go ahead and merge this one in, thanks for the fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Purpose
Declare a minimum Python version of 3.12 because FindPython3 is only available in 3.12 or after. This gives better error messages if a user is using too old a version of CMake.
Before behavior
If you install CMake 3.5, before this PR, you get this error when trying to compile
sensor_msgswithcolcon.New behavior
How to prevent things like this in the future?
The CMake maintainers recommend having CI compile at the
cmake_minimum_requireddeclared in a package.Thus, all the message packages should be compiled with 3.5. This prevents accidentally adding new CMake features and forgetting to bump
cmake_minimum_required.As far as I can tell, the build farm is using the default CMake version of each Tier 1 platform. I think it would be a lot of customization to get this right. For now, manual tests like this one can catch it.
References
ironorhumblebecause of REP-2000's CMake restrictions.