1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-11-03 20:54:07 +01:00

Add cppcheck in Makefile

This commit is contained in:
Anthony Scemama 2021-03-28 15:24:13 +02:00
parent 1b0a60f2fe
commit 10483b882c
2 changed files with 7 additions and 3 deletions

View File

@ -37,13 +37,19 @@ endif
RM=rm -f RM=rm -f
OBJECT_FILES= trexio.o trexio_text.o trexio_hdf5.o OBJECT_FILES= trexio.o trexio_text.o trexio_hdf5.o
SOURCE_FILES= test.c trexio.c trexio_hdf5.c trexio_text.c
HEADER_FILES= trexio.h trexio_text.h trexio_hdf5.h trexio_s.h HEADER_FILES= trexio.h trexio_text.h trexio_hdf5.h trexio_s.h
export CC CFLAGS FC FFLAGS LIBS export CC CFLAGS FC FFLAGS LIBS
.PHONY: clean .PHONY: clean
libtrexio.so: $(OBJECT_FILES) $(HEADER_FILES) cppcheck.out: $(HEADER_FILES) $(SOURCE_FILES)
cppcheck --addon=cert -q --error-exitcode=1 \
--enable=style,warning,unusedFunction,performance,portability,missingInclude \
--language=c -rp --std=c99 -v $(SOURCE_FILES) 2>$@
libtrexio.so: $(OBJECT_FILES) $(HEADER_FILES) cppcheck.out
$(CC) -shared $(OBJECT_FILES) -o libtrexio.so $(CC) -shared $(OBJECT_FILES) -o libtrexio.so
fortran: libtrexio.so trexio_f.f90 fortran: libtrexio.so trexio_f.f90

View File

@ -27,8 +27,6 @@ int test_h5write() {
trexio_t* file = NULL; trexio_t* file = NULL;
trexio_exit_code rc; trexio_exit_code rc;
rc = TREXIO_SUCCESS;
int64_t num = 12; int64_t num = 12;
double coord[36] = { double coord[36] = {