Permalink
Browse files

tests: fix build with autotools

  • Loading branch information...
aberaud committed Mar 17, 2018
1 parent c129a24 commit a5137e8ac4ae9257d83e075ead40b37efc77d49c
Showing with 11 additions and 7 deletions.
  1. +5 −1 Makefile.am
  2. +2 −2 configure.ac
  3. +3 −3 tests/Makefile.am
  4. +1 −1 tests/infohashtester.cpp
View
@@ -12,7 +12,11 @@ if USE_CYTHON
SUBDIRS += python
endif
SUBDIRS += doc tests
if ENABLE_TESTS
SUBDIRS += tests
endif
SUBDIRS += doc
ACLOCAL_AMFLAGS = -I m4
View
@@ -183,8 +183,8 @@ AM_COND_IF([PROXY_CLIENT_OR_SERVER], [
], [])
AC_ARG_ENABLE([tests], AS_HELP_STRING([--enable-tests], [Enable tests]), build_tests=yes, build_tests=no)
AM_CONDITIONAL(OPENDHT_TESTS, test x$build_tests == xyes)
AM_COND_IF([OPENDHT_TESTS], [
AM_CONDITIONAL(ENABLE_TESTS, test x$build_tests == xyes)
AM_COND_IF([ENABLE_TESTS], [
PKG_CHECK_MODULES([CppUnit], [cppunit >= 1.12])
])
View
@@ -1,9 +1,9 @@
if OPENDHT_TESTS
if ENABLE_TESTS
bin_PROGRAMS = opendht_unit_tests
AM_CPPFLAGS = -I../include
nobase_include_HEADERS = infohashtester.h
opendht_unit_tests_SOURCES = tests_runner.cpp infohashtester.cpp
opendht_unit_tests_HEADERS = infohashtester.h
opendht_unit_tests_LDFLAGS = -lopendht -lcppunit -L@top_builddir@/src/.libs @Argon2_LDFLAGS@ @GnuTLS_LIBS@
opendht_unit_tests_LDFLAGS = -lopendht -lcppunit -L@top_builddir@/src/.libs @GnuTLS_LIBS@
endif
View
@@ -25,7 +25,7 @@
#include <string>
// opendht
#include "infohash.h"
#include "opendht/infohash.h"
namespace test {
CPPUNIT_TEST_SUITE_REGISTRATION(InfoHashTester);

0 comments on commit a5137e8

Please sign in to comment.