gunmetalbackupgooglecode / googlemock

Automatically exported from code.google.com/p/googlemock
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

gmock-config expects wrong gtest version #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
== Reproduction
1. Install gmock 1.1.0 on a system without gtest
2. Run `gmock-config --version`

Expected result: "1.1.0"
Actual result: "The Google Test found is not the same version as Google 
Mock was  built against" on STDERR and a return value of 1.

== Product and Environment
gmock-1.1.0 on Darwin 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 
16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 (that's Mac 
10.5.8)

== Additional information

It seems the issue stems from gmock-config having the wrong expectation 
from `gtest-config --exact-version=1.2.1`, on line 253. Obviously, this 
should be the version that gmock was built against which (when using the 
version distributed with gmock-1.1.0) should be 1.3.0.

It looks like this is being set by @GTEST_VERSION@ at scripts/gmock-
config.in:253[1]. Autoconf (not automake) seems to be the only one 
touching this variable, specifically at the end of configure.ac[2]. This final 
setting of GTEST_VERSION = $GTEST_MIN_VERSION seems not to be what is 
intended. Since $HAVE_BUILT_GTEST != "yes" causes the included version 
of gtest to be built, it seems like GTEST_VERSION should either use or copy 
the version number from that copy of gtest.

1: http://code.google.com/p/googlemock/source/browse/tags/release-
1.1.0/scripts/gmock-config.in#253
2: http://code.google.com/p/googlemock/source/browse/tags/release-
1.1.0/configure.ac#119

Original issue reported on code.google.com by josephho...@gmail.com on 24 Sep 2009 at 5:55

GoogleCodeExporter commented 9 years ago
This was fixed in r 166 in the trunk.

Original comment by zhanyong...@gmail.com on 24 Sep 2009 at 5:15