Skip to content

Commit

Permalink
getting fortran tests working
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Mar 22, 2019
1 parent 5c139b0 commit 2e44db6
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ SUBDIRS = src tests examples

# Look in the m4 directory for autotools stuff.
ACLOCAL_AMFLAGS= -I m4

EXTRA_DIST = CMakeLists.txt
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ FLIB = flib
endif

SUBDIRS = clib $(FLIB)

EXTRA_DIST = CMakeLists.txt
2 changes: 2 additions & 0 deletions src/clib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ libpio_la_SOURCES = bget.c pioc_sc.c pio_darray.c pio_file.c \
pio_getput_int.c pio_msg.c pio_nc.c pio_rearrange.c pioc.c \
pioc_support.c pio_darray_int.c pio_get_nc.c pio_lists.c pio_nc4.c \
pio_put_nc.c pio_spmd.c pio_internal.h bget.h uthash.h

EXTRA_DIST = CMakeLists.txt
17 changes: 13 additions & 4 deletions src/flib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# The library we are building.
lib_LTLIBRARIES = libpiof.la

AM_CPPFLAGS = -D_NETCDF -D_NETCDF4 -D_PETCDF

# These linker flags specify libtool version info.
# See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
# for information regarding incrementing `-version-info`.
Expand All @@ -15,14 +17,14 @@ libpiof_la_LDFLAGS = -version-info 1:0:0
# The library soure files.
libpiof_la_LIBADD = libpio_types.la libpio_nf.la libpio_kinds.la \
libpio_support.la libpiodarray.la libpionfatt.la libpionfget.la \
libpionfput.la
libpionfput.la libpiolib_mod.la libpio.la

libpiof_la_SOURCES = pio_types.F90

# Build this uninstalled convenience library.
# Build these uninstalled convenience libraries.
noinst_LTLIBRARIES = libpio_kinds.la libpio_types.la \
libpio_support.la libpio_nf.la libpiodarray.la libpionfatt.la \
libpionfget.la libpionfput.la
libpionfget.la libpionfput.la libpiolib_mod.la libpio.la

# The convenience libraries depends on their source.
libpio_kinds_la_SOURCES = pio_kinds.F90
Expand All @@ -33,6 +35,8 @@ libpiodarray_la_SOURCES = piodarray.F90
libpionfatt_la_SOURCES = pionfatt_mod.F90
libpionfget_la_SOURCES = pionfget_mod.F90
libpionfput_la_SOURCES = pionfput_mod.F90
libpiolib_mod_la_SOURCES = piolib_mod.F90
libpio_la_SOURCES = pio.F90

# Each mod file depends on the .o file.
pio_kinds.mod: pio_kinds.$(OBJEXT)
Expand All @@ -43,11 +47,16 @@ piodarray.mod: piodarray.$(OBJEXT)
pionfatt_mod.mod: pionfatt_mod.$(OBJEXT)
pionfget_mod.mod: pionfget_mod.$(OBJEXT)
pionfput_mod.mod: pionfput_mod.$(OBJEXT)
piolib_mod.mod: piolib_mod.$(OBJEXT)
pio.mod: pio.$(OBJEXT)

# Mod files are built and then installed as headers.
MODFILES = pio_kinds.mod pio_types.mod pio_support.mod pio_nf.mod \
piodarray.mod pionfatt_mod.mod pionfget_mod.mod pionfput_mod.mod
piodarray.mod pionfatt_mod.mod pionfget_mod.mod pionfput_mod.mod \
piolib_mod.mod pio.mod
BUILT_SOURCES = $(MODFILES)
include_HEADERS = $(MODFILES)

CLEANFILES = *.mod

EXTRA_DIST = CMakeLists.txt
2 changes: 2 additions & 0 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ UNIT = unit
endif

SUBDIRS = cunit ${UNIT}

EXTRA_DIST = CMakeLists.txt
22 changes: 17 additions & 5 deletions tests/unit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,30 @@

# Link to our assembled library.
AM_LDFLAGS = ${top_builddir}/src/clib/libpio.la
AM_CPPFLAGS = -I$(top_srcdir)/src/clib
LDADD = ${top_builddir}/src/clib/libpio.la
AM_CPPFLAGS = -I$(top_srcdir)/src/flib
AM_CPPFLAGS += "-D_NETCDF -D_NETCDF4 -D_PETCDF"
LDADD = ${top_builddir}/src/clib/libpiof.la

# Build the tests for make check.
#check_PROGRAMS = test_intercomm2 test_async_mpi test_spmd
# Build the test for make check.
check_PROGRAMS = pio_unit_test_driver
pio_unit_test_driver_SOURCES = driver.F90
pio_unit_test_driver_LDADD = libglobal_vars.la libncdf_tests.la \
libbasic_tests.la ${top_builddir}/src/flib/libpiof.la ${top_builddir}/src/clib/libpio.la

# Build these uninstalled convenience libraries.
noinst_LTLIBRARIES = libglobal_vars.la libncdf_tests.la \
libbasic_tests.la

# The convenience libraries depends on their source.
libglobal_vars_la_SOURCES = global_vars.F90
libncdf_tests_la_SOURCES = ncdf_tests.F90
libbasic_tests_la_SOURCES = basic_tests.F90

# Tests will run from a bash script.
#TESTS = run_tests.sh

# Distribute the test script.
#EXTRA_DIST = run_tests.sh
EXTRA_DIST = CMakeLists.txt #run_tests.sh

# Clean up files produced during testing.
CLEANFILES = *.nc *.log

0 comments on commit 2e44db6

Please sign in to comment.