#35540: google-test: Update to 1.7.0 --------------------------+-------------------------------- Reporter: pengyu.ut@… | Owner: macports-tickets@… Type: update | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: google-test | --------------------------+-------------------------------- Comment (by lynxluna@…): Replying to [comment:3 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 [http://en.wikipedia.org/wiki/One_Definition_Rule One-Definition Rule]." They have a [https://code.google.com/p/googletest/wiki/FAQ #Why_is_it_not_recommended_to_install_a_pre-compiled_copy_of_Goog 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 uses some compiler flags that specific to our need. This, as google pointed out on their [https://code.google.com/p/googletest/wiki/FAQ #Why_is_it_not_recommended_to_install_a_pre-compiled_copy_of_Goog 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. -- Ticket URL: <https://trac.macports.org/ticket/35540#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X