mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
homemade test recusrive target for old autotools versions
This commit is contained in:
parent
8af8b047fd
commit
7df940dc3e
@ -1,5 +1,10 @@
|
||||
# additional include paths necessary to compile the C++ library
|
||||
SUBDIRS = lib benchmarks tests
|
||||
|
||||
.PHONY: tests
|
||||
|
||||
tests:
|
||||
make -C tests tests
|
||||
|
||||
AM_CXXFLAGS += -I$(top_builddir)/include
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
@ -106,6 +106,7 @@ To minimise the build time, only the tests at the root of the `tests` directory
|
||||
``` bash
|
||||
make -C tests/<subdir> tests
|
||||
```
|
||||
If you want to build all the tests at once just use `make tests`.
|
||||
|
||||
### Build configuration options
|
||||
|
||||
|
@ -4,7 +4,6 @@ AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE(subdir-objects)
|
||||
AM_EXTRA_RECURSIVE_TARGETS([tests])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_SRCDIR([lib/Grid.h])
|
||||
AC_CONFIG_HEADERS([lib/Config.h])
|
||||
|
@ -20,15 +20,20 @@ for subdir in $dirs; do
|
||||
TESTS=`ls T*.cc`
|
||||
TESTLIST=`echo ${TESTS} | sed s/.cc//g `
|
||||
PREF=`[ $subdir = '.' ] && echo noinst || echo EXTRA`
|
||||
echo "tests-local: ${TESTLIST}" > Make.inc
|
||||
SUB=`[ $subdir = '.' ] && echo subtests`
|
||||
echo "tests: ${TESTLIST} ${SUB}" > Make.inc
|
||||
echo ${PREF}_PROGRAMS = ${TESTLIST} >> Make.inc
|
||||
echo >> Make.inc
|
||||
for f in $TESTS; do
|
||||
BNAME=`basename $f .cc`
|
||||
echo ${BNAME}_SOURCES=$f >> Make.inc
|
||||
echo ${BNAME}_LDADD=-lGrid>> Make.inc
|
||||
echo >> Make.inc
|
||||
BNAME=`basename $f .cc`
|
||||
echo ${BNAME}_SOURCES=$f >> Make.inc
|
||||
echo ${BNAME}_LDADD=-lGrid>> Make.inc
|
||||
echo >> Make.inc
|
||||
done
|
||||
if [ $subdir != '.' ]; then
|
||||
echo CLEANFILES = ${TESTLIST} >> Make.inc
|
||||
echo >> Make.inc
|
||||
fi
|
||||
done
|
||||
|
||||
# benchmarks Make.inc
|
||||
|
@ -4,4 +4,9 @@ if BUILD_CHROMA_REGRESSION
|
||||
SUBDIRS+= qdpxx
|
||||
endif
|
||||
|
||||
.PHONY: subtests
|
||||
|
||||
include Make.inc
|
||||
|
||||
subtests:
|
||||
for d in $(SUBDIRS); do make -C $${d} tests; done
|
||||
|
Loading…
Reference in New Issue
Block a user