FS#68440 - [gtest,gmock] GOOGLETEST_VERSION undefined

Attached to Project: Community Packages
Opened by Hermann (stertingen) - Tuesday, 27 October 2020, 17:00 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 02 May 2023, 06:43 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Using ROS with catkin (AUR) leads to the following warnings:

CMake Warning at /usr/src/gmock/CMakeLists.txt:43 (project):
VERSION keyword not followed by a value or was followed by a value that
expanded to nothing.


CMake Warning at /usr/src/googletest/CMakeLists.txt:54 (project):
VERSION keyword not followed by a value or was followed by a value that
expanded to nothing.


Although the warning occurs when using ROS from the AUR, I think that the gtest and gmock packages have to be fixed.

Both the gmock CMakeLists.txt and the gtest CMakeLists.txt are supposed to be included by a third CMakeLists.txt which is in the project root (https://github.com/google/googletest/blob/master/CMakeLists.txt). That third file sets the missing GOOGLETEST_VERSION variable, which is missing.

Additional info:
* gtest & gmock version 1.10.0-1
* using ros-melodic-catkin 0.7.28-1
* Related: https://github.com/libspatialindex/libspatialindex/issues/167, https://github.com/google/googletest/issues/2950

Steps to reproduce:

This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 02 May 2023, 06:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  gtest 1.12.0-2
Comment by Hermann (stertingen) - Tuesday, 27 October 2020, 17:06 GMT
Steps to reproduce (using catkin):

1. mkdir -p rosws/src
2. cd rosws/src
3. catkin_create_pkg testpkg
4. cd ..
5. catkin_make

Unfortunately, I have not yet completely investigated how catkin includes gtest and gmock since it handles lots of corner cases and distribution-specific quirks.

However, this could be helpful: https://github.com/ros/catkin/blob/kinetic-devel/cmake/test/gtest.cmake
Comment by Hermann (stertingen) - Thursday, 29 October 2020, 20:57 GMT
This patch seems to resolve this issue by adding the top-level CMakeLists.txt and keeping the directory structure from the Git source

Loading...