Skip to content
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

kinetic-devel: select CMake build type if not configured. #225

Merged

Conversation

gavanderhoorn
Copy link
Member

As per subject.

See the commit comment for rationale.

Summary: CPU usage for an unoptimised build is quite a bit higher than for an optimised one.

If user has not explicitly set a build type, select RelWithDebInfo, which is equivalent to Release with debug symbols enabled.

The refactored version of this driver benefits from optimalisations so selecting a build type with optimalisations enabled is important.

Only if the user hasn't configured a build type do we do this to prevent overriding whatever was already configured.
@gavanderhoorn gavanderhoorn changed the title Select CMake build type if not configured. kinetic-devel: select CMake build type if not configured. Nov 1, 2018
@gavanderhoorn
Copy link
Member Author

This is inspired by how MoveIt detects and configures this.

Copy link
Contributor

@miguelprada miguelprada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Some quick tests from my laptop show a reduction of around 20% in CPU load with this.

@gavanderhoorn
Copy link
Member Author

@miguelprada wrote:

Some quick tests from my laptop show a reduction of around 20% in CPU load with this.

great. That was the point of the PR.

You should still be able to override the build type by configuring it in your catkin_tools profile or by adding -DCMAKE_BUILD_TYPE=Debug (fi) on the catkin_make command line.

@gavanderhoorn
Copy link
Member Author

Could you merge @miguelprada?

@miguelprada miguelprada merged commit ef6d920 into ros-industrial-attic:kinetic-devel Nov 6, 2018
@gavanderhoorn gavanderhoorn deleted the set_build_type branch November 6, 2018 14:09
@gavanderhoorn
Copy link
Member Author

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants