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

skip gtest install rules for newer gtest versions #857

Merged
merged 1 commit into from
Feb 17, 2017

Conversation

dirk-thomas
Copy link
Member

@dirk-thomas dirk-thomas commented Feb 17, 2017

As of version 1.8.0 the CMakeLists.txt file of googletest contains install rules. But catkin marks the targets with EXCLUDE_FROM_ALL which later fails when CMake is trying to install the libraries which haven't been build. The CMake doc explicitly says:

Installing a target with EXCLUDE_FROM_ALL set to true has undefined behavior.

While it might be more appropriate to switch to ExternalProject that will likely break user code. Therefore this patch takes the "ugly" way of overriding the install function to skip the rule for the gtest targets.

In a future ROS distro (e.g. M-turtle) when all targeted platforms use the newer googletest version this should probably be updated to use the new googletest version which also comes bundled with googlemock via ExternalProject.

The change shouldn't harm Kinetic but would make it possible to build ROS Kinetic on systems which use the new googletest version. So I don't think it should go to a lunar-specific branch.

@ros/ros_team Please review.

@dirk-thomas dirk-thomas self-assigned this Feb 17, 2017
Copy link
Member

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

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

Ugly, but I don't know of another way to avoid it. +1

@dirk-thomas dirk-thomas merged commit 51ea0aa into kinetic-devel Feb 17, 2017
@dirk-thomas dirk-thomas deleted the skip_gtest_install branch February 17, 2017 21:41
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