Skip to content

Commit 032a396

Browse files
authored
Merge pull request #7184 from hppritcha/topic/support_for_cray_fortran
cray ftn: modify fortran module loc checker
2 parents 37d70a6 + 7bcd5fc commit 032a396

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

config/ompi_fortran_find_module_include_flag.m4

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dnl University of Stuttgart. All rights reserved.
1111
dnl Copyright (c) 2004-2005 The Regents of the University of California.
1212
dnl All rights reserved.
1313
dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
14+
dnl Copyright (c) 2019 Triad National Security, LLC. All rights
15+
dnl reserved.
1416
dnl $COPYRIGHT$
1517
dnl
1618
dnl Additional copyrights may follow
@@ -66,10 +68,15 @@ EOF
6668
for flag in $ofi_possible_flags; do
6769
if test "$ofi_module_flag" = ""; then
6870
OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 conftest.f90 ${flag}subdir $LDFLAGS $LIBS],
69-
[AS_VAR_SET(fortran_inc_var, [$flag])
70-
ofi_module_flag="$flag"])
71+
[ofi_module_flag=$flag],
72+
dnl try and see if we need to link in a possible object file
73+
[OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 conftest.f90 subdir/conftest-module.o \
74+
${flag}subdir $LDFLAGS $LIBS],
75+
[ofi_module_flag=$flag])])
7176
fi
7277
done
78+
AS_IF([test -n "$ofi_module_flag"],
79+
[AS_VAR_SET(fortran_inc_var, [$ofi_module_flag])])
7380
cd ..
7481
rm -rf conftest.$$
7582
])

0 commit comments

Comments
 (0)