#67449 closed defect (fixed)

Apparently Gtest does not set its own version, which leaves it defunct

Reported by: barracuda156 Owned by: judaew (Vadym-Valdis Yudaiev)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: gtest

Description

What happens when trying to use it:

GOOGLETEST_ROOT: /opt/local/src
CMake Warning at /opt/local/src/googlemock/CMakeLists.txt:41 (project):
  VERSION keyword not followed by a value or was followed by a value that
  expanded to nothing.


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


-- Found Python: /opt/local/bin/python3.11 (found version "3.11.3") found components: Interpreter 
CMake Error at /opt/local/src/googletest/CMakeLists.txt:127 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


CMake Error at /opt/local/src/googletest/CMakeLists.txt:129 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


CMake Error at /opt/local/src/googlemock/CMakeLists.txt:99 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


CMake Error at /opt/local/src/googlemock/CMakeLists.txt:102 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


-- Configuring incomplete, errors occurred!

Looks like GOOGLETEST_VERSION is set to nothing.

Change History (6)

comment:1 Changed 12 months ago by kencu (Ken)

buildbots show successful builds on all systems, so you better tell us more about exactly what you’re trying to build on now….

https://ports.macports.org/port/gtest/details/

comment:2 in reply to:  1 Changed 12 months ago by barracuda156

Replying to kencu:

buildbots show successful builds on all systems, so you better tell us more about exactly what you’re trying to build on now….

https://ports.macports.org/port/gtest/details/

It builds successfully, no issues. But does not work when you try to use it for another port.

It also becomes normally usable, once version is defined to unbreak CMake macros.

Last edited 12 months ago by barracuda156 (previous) (diff)

comment:3 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)

Over a dozen ports depend on port:gtest so presumably it worked when that was added to those ports. Can you give an example of one of them that fails this way now?

comment:4 Changed 12 months ago by judaew (Vadym-Valdis Yudaiev)

I think I fixed this issue. However, since you haven't specified the project in which you're encountering this issue, would you be able to test my patch yourself? See https://github.com/macports/macports-ports/pull/18739.

comment:5 in reply to:  3 Changed 11 months ago by barracuda156

Replying to ryandesign:

Over a dozen ports depend on port:gtest so presumably it worked when that was added to those ports. Can you give an example of one of them that fails this way now?

Sure: https://github.com/macports/macports-ports/actions/runs/5034412983/jobs/9029213247

comment:6 Changed 11 months ago by judaew (Vadym-Valdis Yudaiev)

Resolution: fixed
Status: assignedclosed

In 40c602890761e5af7fee84b686dde382d238b694/macports-ports (master):

gtest(patch): Add gtest version to CMakeLists

Fixed: #67449

Note: See TracTickets for help on using tickets.