mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-11 22:50:45 +01: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
|
# additional include paths necessary to compile the C++ library
|
||||||
SUBDIRS = lib benchmarks tests
|
SUBDIRS = lib benchmarks tests
|
||||||
|
|
||||||
|
.PHONY: tests
|
||||||
|
|
||||||
|
tests:
|
||||||
|
make -C tests tests
|
||||||
|
|
||||||
AM_CXXFLAGS += -I$(top_builddir)/include
|
AM_CXXFLAGS += -I$(top_builddir)/include
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
@ -106,6 +106,7 @@ To minimise the build time, only the tests at the root of the `tests` directory
|
|||||||
``` bash
|
``` bash
|
||||||
make -C tests/<subdir> tests
|
make -C tests/<subdir> tests
|
||||||
```
|
```
|
||||||
|
If you want to build all the tests at once just use `make tests`.
|
||||||
|
|
||||||
### Build configuration options
|
### Build configuration options
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ AC_CANONICAL_BUILD
|
|||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
AC_CANONICAL_TARGET
|
AC_CANONICAL_TARGET
|
||||||
AM_INIT_AUTOMAKE(subdir-objects)
|
AM_INIT_AUTOMAKE(subdir-objects)
|
||||||
AM_EXTRA_RECURSIVE_TARGETS([tests])
|
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AC_CONFIG_SRCDIR([lib/Grid.h])
|
AC_CONFIG_SRCDIR([lib/Grid.h])
|
||||||
AC_CONFIG_HEADERS([lib/Config.h])
|
AC_CONFIG_HEADERS([lib/Config.h])
|
||||||
|
@ -20,15 +20,20 @@ for subdir in $dirs; do
|
|||||||
TESTS=`ls T*.cc`
|
TESTS=`ls T*.cc`
|
||||||
TESTLIST=`echo ${TESTS} | sed s/.cc//g `
|
TESTLIST=`echo ${TESTS} | sed s/.cc//g `
|
||||||
PREF=`[ $subdir = '.' ] && echo noinst || echo EXTRA`
|
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 ${PREF}_PROGRAMS = ${TESTLIST} >> Make.inc
|
||||||
echo >> Make.inc
|
echo >> Make.inc
|
||||||
for f in $TESTS; do
|
for f in $TESTS; do
|
||||||
BNAME=`basename $f .cc`
|
BNAME=`basename $f .cc`
|
||||||
echo ${BNAME}_SOURCES=$f >> Make.inc
|
echo ${BNAME}_SOURCES=$f >> Make.inc
|
||||||
echo ${BNAME}_LDADD=-lGrid>> Make.inc
|
echo ${BNAME}_LDADD=-lGrid>> Make.inc
|
||||||
echo >> Make.inc
|
echo >> Make.inc
|
||||||
done
|
done
|
||||||
|
if [ $subdir != '.' ]; then
|
||||||
|
echo CLEANFILES = ${TESTLIST} >> Make.inc
|
||||||
|
echo >> Make.inc
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# benchmarks Make.inc
|
# benchmarks Make.inc
|
||||||
|
@ -4,4 +4,9 @@ if BUILD_CHROMA_REGRESSION
|
|||||||
SUBDIRS+= qdpxx
|
SUBDIRS+= qdpxx
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
.PHONY: subtests
|
||||||
|
|
||||||
include Make.inc
|
include Make.inc
|
||||||
|
|
||||||
|
subtests:
|
||||||
|
for d in $(SUBDIRS); do make -C $${d} tests; done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user