Commit 0f333129 authored by ulrich_y's avatar ulrich_y

Added coverage to configure

parent 50b6f943
......@@ -2,6 +2,11 @@
!/**/
!*.*
makefile
# gcc coverage testing tool files
*.gcno
*.gcda
*.gcov
checks/*.f90
checks/stats.txt
### Vim ###
......
......@@ -95,6 +95,7 @@ fi
allargs="$@"
NATIVE=false
DEBUG=false
COVERAGE=false
for arg in "$@" ; do
case "$arg" in
--debug)
......@@ -115,6 +116,8 @@ for arg in "$@" ; do
CONF_BITS="-m32" ;;
--64)
CONF_BITS="-m64" ;;
--coverage)
COVERAGE=true ;;
--help )
printhelp ;;
-*)
......@@ -133,6 +136,10 @@ test=test$$
trap "rm -fr $test* =." 0 1 2 3 15
if $COVERAGE ; then
$DEBUG || echo "Warning: --coverage implies --debug!" 1>&3
DEBUG=true
fi
## look for some programs
findprog() {
......@@ -214,6 +221,10 @@ case "$1,$2,$3" in
eval addflag FFLAGS -DRELEASE
$NATIVE && eval addflag FFLAGS -march=native -mtune=native
fi
if $COVERAGE ; then
echo "Coverage analytics is currently only supported for gcc"
exit 1
fi
;;
GNU,Fortran,*)
gnuflags
......@@ -229,6 +240,10 @@ case "$1,$2,$3" in
eval addflag FFLAGS -DRELEASE -O3
$NATIVE && eval addflag FFLAGS -march=native -mtune=native
fi
if $COVERAGE ; then
eval addflag FFLAGS --coverage
eval addflag LFLAGS -lgcov
fi
;;
ifort*)
eval addflag FFLAGS -autodouble
......@@ -251,6 +266,10 @@ case "$1,$2,$3" in
echo "Option --with-mcc is incompatible with ifort, disabling" 1>&3
HAVE_MCC=false
fi
if $COVERAGE ; then
echo "Coverage analytics is currently only supported for gcc"
exit 1
fi
;;
*)
echo "Unknown compiler" 1>&3
......@@ -700,11 +719,13 @@ check: test
./$<
clean:
@rm -f build/*.gcda build/*.gcno build/*.gcov
@rm -f build/*.o build/*.mod build/*.c build/mcc.internals*
@rm -f test geval libhandyg.a handyg
@rm -f checks/test-chen.f90 checks/test-muone.f90 checks/test-muoneNP.f90
distclean:
@rm -f build/*.gcda build/*.gcno build/*.gcov
@rm -f build/*.o build/*.mod build/*.c build/mcc.internals*
@rm -f test geval libhandyg.a handyg
@rm -f checks/test-chen.f90 checks/test-muone.f90 checks/test-muoneNP.f90
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment