My current requirement when configuring my project:
build and run gtest-based unit tests if gtest is found, otherwise ignore.
Am I supposed to be able to use this ??
dnl GTEST_LIB_CHECK([minimum version [,
dnl action if found [,action if not found]]])
I'm hitting AC_MSG_ERROR, which aborts, if gtest cannot be found,
so the [action if not found] seems a bit misleading.
-- didrik
Yes.
> dnl GTEST_LIB_CHECK([minimum version [,
> dnl action if found [,action if not found]]])
>
> I'm hitting AC_MSG_ERROR, which aborts, if gtest cannot be found,
> so the [action if not found] seems a bit misleading.
I need more information here to determine where the problem resides.
What version of gtest.m4? (head, a release?) What is the exact way you
are using it in your configure.ac? What is the exact output it
provides? How are you running the './configure' step when it does
this?
Thanks!
-Chandler
>
> -- didrik
>
I'm running from head of the svn branch.
Copied gtest.m4 to current directory.
a minimal configure.in
===============
AC_INIT([Testing])
AC_CONFIG_SRCDIR([./configure.in])
m4_include(gtest.m4)
GTEST_LIB_CHECK([1.4.0], AC_MSG_WARN([YAY]), AC_MSG_WARN([NON]))
===============
$autoreconf
$autoconf
$./configure
checking for 'gtest-config'... no
configure: error: Unable to locate either a built or installed Google Test.
The specific location '' was provided for a built or installed
Google Test, but no 'gtest-config' script could be found at this location.
$./configure --enable-gtest=/usr/local
checking for 'gtest-config'... /usr/local/bin/gtest-config
checking for Google Test at least version >= 1.4.0... yes
configure: WARNING: YAY
-- didrik
>
> Thanks!
> -Chandler
>
>>
>> -- didrik
>>
>