From cd88f721fbc5c066720d07eb70fc5ce1f382877f Mon Sep 17 00:00:00 2001 From: Yannick Ulrich Date: Thu, 3 Oct 2019 11:34:09 +0200 Subject: [PATCH] Sorted #if in test --- checks/test.f90 | 26 ++++++++++++++++---------- configure | 2 +- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/checks/test.f90 b/checks/test.f90 index c60b4af..5f531d1 100644 --- a/checks/test.f90 +++ b/checks/test.f90 @@ -30,7 +30,7 @@ PROGRAM TEST call get_command_argument(i,arg) read(arg,*) verb ! str to int #else - call errprint("-verb not available, compile with --debug") + call errprint("Argument -verb is not available, compile with --debug") #endif case('-mpl-test') tol = zero * 1.e5_prec @@ -42,8 +42,7 @@ PROGRAM TEST tol = 8.0e-7 tests_successful = tests_successful .and. do_chen_test() -#ifdef HAVE_GINAC -#ifdef HAVE_MM +#if defined(HAVE_GINAC) && defined(HAVE_MM) case('-ginac-tests') tol = 8.0e-7 call do_ginac_tests @@ -55,10 +54,18 @@ PROGRAM TEST case ('-hw-tests') tol = 8.0e-7 call do_high_weight_tests +#else + case('-ginac-tests', '-speed-tests', '-hw-tests') + call errprint("Argument "//trim(arg)//" is not available, compile with --with-ginac --with-mcc") +#endif + +#ifdef HAVE_GINAC case ('-long-test') tol = 8.0e-7 call do_long_test -#endif +#else + case('-long-test') + call errprint("Argument "//trim(arg)//" is not available, compile with --with-ginac") #endif case ('-report') #ifdef DEBUG @@ -69,10 +76,8 @@ PROGRAM TEST call do_GPL_tests tol = 8.0e-7 tests_successful = tests_successful .and. do_chen_test() -#ifdef HAVE_GINAC -#ifdef HAVE_MM +#if defined(HAVE_GINAC) && defined(HAVE_MM) call do_ginac_tests -#endif #endif case default @@ -470,7 +475,6 @@ CONTAINS #ifdef HAVE_GINAC -#ifdef HAVE_MM function evalt(arr, what) #if KINDREAL==16 @@ -505,6 +509,9 @@ CONTAINS endif end function + +#ifdef HAVE_MM + subroutine perform_ginacv(n, args) use maths_functions, only:clearcache complex(kind=prec) :: args(:,:) @@ -533,7 +540,6 @@ CONTAINS end subroutine -#ifndef NOSPEED subroutine do_one_speed_test(args, u, msg) use maths_functions, only:clearcache implicit none @@ -836,7 +842,7 @@ CONTAINS #endif -#endif + ! subroutine do_shuffle_tests() ! complex(kind=prec) :: v(2) = cmplx((/1,2/)) ! complex(kind=prec) :: w(2) = cmplx((/3,4/)) diff --git a/configure b/configure index eac4843..bdf88b9 100755 --- a/configure +++ b/configure @@ -747,7 +747,7 @@ build/%.o: src/%.f90 build/%.o: checks/%.f90 @echo "F90 \$@" - @\$(FC) \$(FFLAGS) -c \$< -o \$@ + @\$(FC) \$(FFLAGS) -Wno-unused-function -c \$< -o \$@ build/%.o: src/%.cpp @echo "C++ \$@" -- GitLab