Require CMake 3.12 due to introduction of FindPython3 #515
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_msgs
withcolcon
.New behavior
How to prevent things like this in the future?
The CMake maintainers recommend having CI compile at the
cmake_minimum_required
declared 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
iron
orhumble
because of REP-2000's CMake restrictions.