-
Notifications
You must be signed in to change notification settings - Fork 280
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
bump CMake minimum version to use new behavior of CMP0048 #1052
Conversation
This needs a rebase to pass CI. |
While this should work I am worried to require this change in every ROS package. Maybe we should explicitly set the policy (to enabled?)? |
CMP0048 NEW behavior sets PROJECT_VERSION variables to empty strings if project() is called with no VERSION argument. This could be a problem for packages that set VERSION variables prior to project() because project() would then clear them, but catkin does not do this. Signed-off-by: Shane Loretz <[email protected]>
aa096d7
to
030ec88
Compare
I'm not sure how to do that automatically for downstream projects. IIUC it looks like the warning is issued in the |
I bumped the CMake minimum version to something at least 3.0 (which is when CMP0048 was introduced) but not higher than 3.0.2 which is the CMake version on Debian Jessie targeted by ROS Kinetic. |
✔️ works on my machine |
Examples of similar fixes: ros/catkin#1052 ros/message_generation#5
* Bump CMake version to avoid CMP0048 This bumps the minimum CMake version to 3.0.2, which is the minimum supported by ROS Kinetic and new enough to default to the NEW behavior of CMP0048. This avoids a CMake warning when building and testing this package in Debian Buster and Ubuntu Focal. See ros/catkin#1052 Signed-off-by: Shane Loretz<[email protected]> Signed-off-by: Shane Loretz <[email protected]> * Use catkin_install_python Uses catkin_install_python() so scripts are installed with the correct shebang for the given version of ROS. http://wiki.ros.org/UsingPython3/SourceCodeChanges#Changing_shebangs Signed-off-by: Shane Loretz<[email protected]> Signed-off-by: Shane Loretz <[email protected]>
about VERSION being managed by project() since 3.0 Keep the version consistent with other packages in ROS that applied similar fixes, e.g., ros/catkin#1052
CMP0048 NEW behavior sets PROJECT_VERSION variables to empty strings if
project() is called with no VERSION argument. This could be a problem
for packages that set VERSION variables prior to project() because
project() would then clear them, but catkin does not do this.
edit: This bumps the minimum CMake version to 3.0.2, which is the minimum supported by ROS Kinetic and new enough to default to the NEW behavior of CMP0048. This avoids a CMake warning when building and testing this package in Debian Buster and Ubuntu Focal.
Fixes this CMake warning: http://build.ros.org/job/Npr__catkin__ubuntu_focal_amd64/4/warnings2Result/new/