Skip to content
Snippets Groups Projects
Commit a5137e8a authored by Adrien Béraud's avatar Adrien Béraud
Browse files

tests: fix build with autotools

parent c129a244
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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])
])
......
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
......@@ -25,7 +25,7 @@
#include <string>
// opendht
#include "infohash.h"
#include "opendht/infohash.h"
namespace test {
CPPUNIT_TEST_SUITE_REGISTRATION(InfoHashTester);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment