mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-01-03 10:06:01 +01:00
Optionally disable the Fortran tests in the user mode
This commit is contained in:
parent
c0879ad974
commit
1fde6f9aa1
16
Makefile.am
16
Makefile.am
@ -34,7 +34,11 @@
|
|||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
CLEANFILES = trexio.mod
|
CLEANFILES = trexio.mod
|
||||||
|
if HAVE_FORTRAN
|
||||||
BUILT_SOURCES = trexio.mod
|
BUILT_SOURCES = trexio.mod
|
||||||
|
else
|
||||||
|
BUILT_SOURCES =
|
||||||
|
endif
|
||||||
EXTRA_DIST = .git_hash
|
EXTRA_DIST = .git_hash
|
||||||
|
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
@ -48,7 +52,10 @@ pkgconfig_DATA = pkgconfig/trexio.pc
|
|||||||
trexio_h = $(srcdir)/include/trexio.h
|
trexio_h = $(srcdir)/include/trexio.h
|
||||||
trexio_f = $(srcdir)/include/trexio_f.f90
|
trexio_f = $(srcdir)/include/trexio_f.f90
|
||||||
|
|
||||||
include_HEADERS = $(trexio_h) $(trexio_f)
|
include_HEADERS = $(trexio_h)
|
||||||
|
if HAVE_FORTRAN
|
||||||
|
include_HEADERS += $(trexio_f)
|
||||||
|
endif
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(srcdir)/src -I$(srcdir)/include
|
AM_CPPFLAGS = -I$(srcdir)/src -I$(srcdir)/include
|
||||||
|
|
||||||
@ -136,15 +143,19 @@ TESTS_C += \
|
|||||||
tests/overwrite_all_hdf5
|
tests/overwrite_all_hdf5
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
TESTS = $(TESTS_C)
|
||||||
|
if HAVE_FORTRAN
|
||||||
TESTS_F = \
|
TESTS_F = \
|
||||||
tests/test_f
|
tests/test_f
|
||||||
|
TESTS += $(TESTS_F)
|
||||||
|
endif
|
||||||
|
|
||||||
TESTS = $(TESTS_C) $(TESTS_F)
|
|
||||||
check_PROGRAMS = $(TESTS)
|
check_PROGRAMS = $(TESTS)
|
||||||
|
|
||||||
# specify common LDADD options for all tests
|
# specify common LDADD options for all tests
|
||||||
LDADD = src/libtrexio.la
|
LDADD = src/libtrexio.la
|
||||||
|
|
||||||
|
if HAVE_FORTRAN
|
||||||
test_trexio_f = $(srcdir)/tests/trexio_f.f90
|
test_trexio_f = $(srcdir)/tests/trexio_f.f90
|
||||||
|
|
||||||
$(test_trexio_f): $(trexio_f)
|
$(test_trexio_f): $(trexio_f)
|
||||||
@ -153,6 +164,7 @@ $(test_trexio_f): $(trexio_f)
|
|||||||
trexio.mod: tests/trexio_f.o
|
trexio.mod: tests/trexio_f.o
|
||||||
|
|
||||||
tests_test_f_SOURCES = $(test_trexio_f) tests/test_f.f90
|
tests_test_f_SOURCES = $(test_trexio_f) tests/test_f.f90
|
||||||
|
endif
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
-rm -rf -- *.dir/ *.h5 __pycache__/
|
-rm -rf -- *.dir/ *.h5 __pycache__/
|
||||||
|
@ -50,12 +50,18 @@ AS_IF([test "$ac_cv_prog_cc_c99" = "no"],
|
|||||||
[AC_MSG_ERROR([The compiler does not support C99])])
|
[AC_MSG_ERROR([The compiler does not support C99])])
|
||||||
AC_PROG_CC_C_O
|
AC_PROG_CC_C_O
|
||||||
|
|
||||||
# Fortran
|
|
||||||
|
# Fortran API [default: --with-fortran], do not disable in the dev mode
|
||||||
|
AC_ARG_WITH(fortran, [AS_HELP_STRING([--without-fortran],[do not test and install the Fortran API])], ok=$withval, ok=yes)
|
||||||
|
if test "$ok" = "yes"; then
|
||||||
AC_PROG_FC
|
AC_PROG_FC
|
||||||
AC_FC_FREEFORM
|
AC_FC_FREEFORM
|
||||||
AC_FC_SRCEXT([f90])
|
AC_FC_SRCEXT([f90])
|
||||||
AC_PROG_FC_C_O
|
AC_PROG_FC_C_O
|
||||||
AC_FC_LIBRARY_LDFLAGS
|
AC_FC_LIBRARY_LDFLAGS
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL([HAVE_FORTRAN],[test "$ok" = "yes"])
|
||||||
|
|
||||||
# pkg-config
|
# pkg-config
|
||||||
PKG_PROG_PKG_CONFIG()
|
PKG_PROG_PKG_CONFIG()
|
||||||
|
Loading…
Reference in New Issue
Block a user