mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 10:06:09 +01:00
Allow tests in fortran
This commit is contained in:
parent
8df6823f50
commit
f0c9226393
@ -37,10 +37,16 @@ done >> $OUTPUT
|
||||
|
||||
TESTS=""
|
||||
for i in $(ls test_qmckl_*.c) ; do
|
||||
FILE=${i}
|
||||
FILE=${i%.c}.o
|
||||
TESTS="${TESTS} ${FILE}"
|
||||
done >> $OUTPUT
|
||||
|
||||
TESTS_F=""
|
||||
for i in $(ls test_qmckl_*.f90) ; do
|
||||
FILE=${i%.f90}.o
|
||||
TESTS_F="${TESTS_F} ${FILE}"
|
||||
done >> $OUTPUT
|
||||
|
||||
|
||||
# Write the Makefile
|
||||
|
||||
@ -52,6 +58,7 @@ FC=$FC
|
||||
FFLAGS=$FFLAGS
|
||||
OBJECT_FILES=$OBJECTS
|
||||
TESTS=$TESTS
|
||||
TESTS_F=$TESTS_F
|
||||
|
||||
LIBS=$LIBS
|
||||
|
||||
@ -64,10 +71,9 @@ libqmckl.so: \$(OBJECT_FILES)
|
||||
%.o: %.f90
|
||||
\$(FC) \$(FFLAGS) -c \$*.f90 -o \$*.o
|
||||
|
||||
test_qmckl: test_qmckl.c libqmckl.so \$(TESTS)
|
||||
echo \$(TESTS)
|
||||
test_qmckl: test_qmckl.c libqmckl.so \$(TESTS) \$(TESTS_F)
|
||||
\$(CC) \$(CFLAGS) -Wl,-rpath,$PWD -L. \
|
||||
../munit/munit.c \$(TESTS) -lqmckl \$(LIBS) test_qmckl.c -o test_qmckl
|
||||
../munit/munit.c \$(TESTS) \$(TESTS_F) -lqmckl \$(LIBS) test_qmckl.c -o test_qmckl
|
||||
|
||||
test: test_qmckl
|
||||
./test_qmckl
|
||||
@ -91,3 +97,9 @@ for i in $(ls test_qmckl_*.c) ; do
|
||||
done >> $OUTPUT
|
||||
|
||||
|
||||
for i in $(ls test_qmckl*.f90) ; do
|
||||
FILE=${i%.f90}
|
||||
echo "${FILE}.o: ${FILE}.f90"
|
||||
done >> $OUTPUT
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user