Improved integration of check library. Should do the same for benchmarks.
This commit is contained in:
parent
688c382420
commit
fba715aebb
20
configure.ac
20
configure.ac
@ -50,12 +50,20 @@ if test x$cxxmph = xtrue; then
|
|||||||
AC_SUBST([CXXMPH], "cxxmph")
|
AC_SUBST([CXXMPH], "cxxmph")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PKG_CHECK_MODULES([CHECK], [check >= 0.9.8], [HAVE_LIBCHECK=1], [HAVE_LIBCHECK=])
|
# Unit tests based on the check library. Disabled by default.
|
||||||
if test "x$CHECK_LIBS" = "x" ; then
|
# We do not use pkg-config because it is inconvenient for all developers to
|
||||||
if test "x$cxxmph" = "xtrue"; then
|
# have check library installed.
|
||||||
AC_MSG_WARN([Testing library not found, make check will fail.])
|
AC_ARG_ENABLE(check, AS_HELP_STRING(
|
||||||
fi
|
[--enable-check],
|
||||||
fi
|
[Build unit tests depending on check library (default: disabled)]))
|
||||||
|
AS_IF([test "x$enable_check" = "xyes"],
|
||||||
|
[ AC_CHECK_LIB([check], [tcase_create])
|
||||||
|
AS_IF([test "$ac_cv_lib_check_tcase_create" = yes], [CHECK_LIBS="-lcheck"],
|
||||||
|
[AC_MSG_ERROR("Failed to find check library (http://check.sf.net).")])
|
||||||
|
AC_CHECK_HEADER(check.h,[],
|
||||||
|
[AC_MSG_ERROR("Failed to find check library header (http://check.sf.net).")])
|
||||||
|
])
|
||||||
|
AM_CONDITIONAL([USE_LIBCHECK], [test "$ac_cv_lib_check_tcase_create" = yes])
|
||||||
AC_SUBST(CHECK_LIBS)
|
AC_SUBST(CHECK_LIBS)
|
||||||
AC_SUBST(CHECK_CFLAGS)
|
AC_SUBST(CHECK_CFLAGS)
|
||||||
|
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
TESTS = $(check_PROGRAMS)
|
TESTS = $(check_PROGRAMS)
|
||||||
check_PROGRAMS = test_test seeded_hash_test mph_bits_test hollow_iterator_test mph_map_test mph_index_test trigraph_test map_tester_test string_util_test
|
check_PROGRAMS = seeded_hash_test mph_bits_test hollow_iterator_test mph_index_test trigraph_test string_util_test
|
||||||
noinst_PROGRAMS = bm_index bm_map
|
if USE_LIBCHECK
|
||||||
|
check_PROGRAMS += test_test map_tester_test mph_map_test
|
||||||
|
check_LTLIBRARIES = libcxxmph_test.la
|
||||||
|
endif
|
||||||
|
|
||||||
|
noinst_PROGRAMS = bm_map # bm_index - disabled because of cmph dependency
|
||||||
bin_PROGRAMS = cxxmph
|
bin_PROGRAMS = cxxmph
|
||||||
|
|
||||||
cxxmph_includedir = $(includedir)/cxxmph/
|
cxxmph_includedir = $(includedir)/cxxmph/
|
||||||
cxxmph_include_HEADERS = mph_bits.h mph_map.h mph_index.h MurmurHash3.h trigraph.h seeded_hash.h stringpiece.h hollow_iterator.h string_util.h
|
cxxmph_include_HEADERS = mph_bits.h mph_map.h mph_index.h MurmurHash3.h trigraph.h seeded_hash.h stringpiece.h hollow_iterator.h string_util.h
|
||||||
|
|
||||||
check_LTLIBRARIES = libcxxmph_test.la
|
|
||||||
noinst_LTLIBRARIES = libcxxmph_bm.la
|
noinst_LTLIBRARIES = libcxxmph_bm.la
|
||||||
lib_LTLIBRARIES = libcxxmph.la
|
lib_LTLIBRARIES = libcxxmph.la
|
||||||
libcxxmph_la_SOURCES = MurmurHash3.cpp trigraph.cc mph_bits.cc mph_index.cc benchmark.h benchmark.cc string_util.cc
|
libcxxmph_la_SOURCES = MurmurHash3.cpp trigraph.cc mph_bits.cc mph_index.cc benchmark.h benchmark.cc string_util.cc
|
||||||
|
Loading…
Reference in New Issue
Block a user