mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-08-17 02:41:43 +02:00
Allow tests in fortran
This commit is contained in:
parent
8df6823f50
commit
f0c9226393
@ -37,10 +37,16 @@ done >> $OUTPUT
|
|||||||
|
|
||||||
TESTS=""
|
TESTS=""
|
||||||
for i in $(ls test_qmckl_*.c) ; do
|
for i in $(ls test_qmckl_*.c) ; do
|
||||||
FILE=${i}
|
FILE=${i%.c}.o
|
||||||
TESTS="${TESTS} ${FILE}"
|
TESTS="${TESTS} ${FILE}"
|
||||||
done >> $OUTPUT
|
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
|
# Write the Makefile
|
||||||
|
|
||||||
@ -52,6 +58,7 @@ FC=$FC
|
|||||||
FFLAGS=$FFLAGS
|
FFLAGS=$FFLAGS
|
||||||
OBJECT_FILES=$OBJECTS
|
OBJECT_FILES=$OBJECTS
|
||||||
TESTS=$TESTS
|
TESTS=$TESTS
|
||||||
|
TESTS_F=$TESTS_F
|
||||||
|
|
||||||
LIBS=$LIBS
|
LIBS=$LIBS
|
||||||
|
|
||||||
@ -64,10 +71,9 @@ libqmckl.so: \$(OBJECT_FILES)
|
|||||||
%.o: %.f90
|
%.o: %.f90
|
||||||
\$(FC) \$(FFLAGS) -c \$*.f90 -o \$*.o
|
\$(FC) \$(FFLAGS) -c \$*.f90 -o \$*.o
|
||||||
|
|
||||||
test_qmckl: test_qmckl.c libqmckl.so \$(TESTS)
|
test_qmckl: test_qmckl.c libqmckl.so \$(TESTS) \$(TESTS_F)
|
||||||
echo \$(TESTS)
|
|
||||||
\$(CC) \$(CFLAGS) -Wl,-rpath,$PWD -L. \
|
\$(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: test_qmckl
|
||||||
./test_qmckl
|
./test_qmckl
|
||||||
@ -91,3 +97,9 @@ for i in $(ls test_qmckl_*.c) ; do
|
|||||||
done >> $OUTPUT
|
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