Opened 12 years ago

Closed 10 years ago

Last modified 10 years ago

#35540 closed update (wontfix)

google-test: Update to 1.7.0

Reported by: pengyu.ut@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), venabled@…, soriyath@…, lynxluna (Didiet), cooljeanius (Eric Gallager), arto@…
Port: google-test

Description

google-test is now of 1.6.0. The one in macports is still 1.5.0. It is better to update it to the latest version.

Attachments (3)

google-test-1.6.0.diff (971 bytes) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.
google-test-1.7.0.diff (972 bytes) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.
partial patch
google-test-1.7.0.2.diff (1.1 KB) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.
partial patch

Download all attachments as: .zip

Change History (14)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Port: google-test added
Summary: Update google-test to 1.6.0google-test: Update to 1.6.0
Type: requestupdate
Version: 2.1.2

Thanks for letting us know this new version is available. Here is a minimal diff to update the port, but it fails at the destroot stage, saying:

'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system.

So someone will need to read and understand the README and adapt the portfile accordingly.

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: google-test-1.6.0.diff added

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: google-test: Update to 1.6.0google-test: Update to 1.7.0

This will also fix #40910.

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: google-test-1.7.0.diff added

partial patch

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: google-test-1.7.0.2.diff added

partial patch

comment:3 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: venabled@… added

I updated the patch to use cmake, since that's the only supported build system since 1.5.0, but it still doesn't have an install target.

I found a comment at the bottom of Makefile.am which says that "make install" is disabled because "installing a compiled version of Google Test can lead to undefined behavior due to violation of the One-Definition Rule." They have a FAQ entry about this too.

So we can either think we're smarter than Google and install it anyway (and as a non-C++-programmer I don't feel competent to do that), or we can delete google-test from MacPorts.

comment:4 Changed 10 years ago by soriyath@…

Cc: soriyath@… added

Cc Me!

comment:5 in reply to:  3 Changed 10 years ago by lynxluna (Didiet)

Replying to ryandesign@…:

I updated the patch to use cmake, since that's the only supported build system since 1.5.0, but it still doesn't have an install target.

I found a comment at the bottom of Makefile.am which says that "make install" is disabled because "installing a compiled version of Google Test can lead to undefined behavior due to violation of the One-Definition Rule." They have a FAQ entry about this too.

So we can either think we're smarter than Google and install it anyway (and as a non-C++-programmer I don't feel competent to do that), or we can delete google-test from MacPorts.

When we write C++ code, we usually use some compiler flags that specific to our need. This, as Google pointed out on their FAQ entry can cause problems. If gtest is compiled using macports flags and I use the flags that is slightly different or using different compiler, e.g. clang vs gcc, it can create a runtime problem. I usually end up just including all of gtest sources and build it directly on my test cases using the same compiler and the same compiler flags as the rest of my sources.

I think it's wise to delete the google-test framework from macports as well as gmock as it depends on google-gtest and put the warning upon installation.

Last edited 10 years ago by lynxluna (Didiet) (previous) (diff)

comment:6 Changed 10 years ago by venabled@…

After reading googles guidance I think we should Get rid of this port due to the points brought up by Google and lynxluna.

comment:7 Changed 10 years ago by larryv (Lawrence Velázquez)

+1 for removal.

comment:8 Changed 10 years ago by lynxluna (Didiet)

Cc: lynxluna@… added

Cc Me!

comment:9 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: wontfix
Status: newclosed

Removed: r115909

comment:10 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:11 Changed 10 years ago by arto@…

Cc: arto@… added

Cc Me!

Note: See TracTickets for help on using tickets.