1
1

Merge pull request #7584 from ggouaillardet/topic/configury_fpp

configury: try if -fpp flag is needed to preprocess .F90 files
Этот коммит содержится в:
Jeff Squyres 2020-04-01 12:53:57 -04:00 коммит произвёл GitHub
родитель 4c89999266 a2c711b54b
Коммит 92b58987d6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

Просмотреть файл

@ -14,8 +14,8 @@ dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights
dnl reserved. dnl reserved.
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2015-2016 Research Organization for Information Science dnl Copyright (c) 2015-2020 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved. dnl and Technology (RIST). All rights reserved.
dnl $COPYRIGHT$ dnl $COPYRIGHT$
dnl dnl
dnl Additional copyrights may follow dnl Additional copyrights may follow
@ -139,6 +139,24 @@ AC_DEFUN([OMPI_SETUP_FC],[
[AC_FC_SRCEXT(f) [AC_FC_SRCEXT(f)
AC_FC_SRCEXT(f90)]) AC_FC_SRCEXT(f90)])
AC_MSG_CHECKING([if Fortran compilers preprocess .F90 files without additional flag])
cat > conftest_f.F90 << EOF
#if 0
#error The source file was not preprocessed
#endif
program bogus
end program
EOF
OPAL_LOG_COMMAND([$FC $FCFLAGS -c conftest_f.F90],
[AC_MSG_RESULT(["yes"])],
[AC_MSG_CHECKING([if -fpp flag works])
OPAL_LOG_COMMAND([$FC $FCFLAGS -fpp -c conftest_f.F90],
[AC_MSG_RESULT(["yes"])
FCFLAGS="$FCFLAGS -fpp"],
[AC_MSG_RESULT("no")
AC_MSG_ERROR(["cannot preprocess Fortran files, Aborting"])])])
rm -f conftest*
# Per trac #1982, on OS X, we may need some esoteric linker flags # Per trac #1982, on OS X, we may need some esoteric linker flags
# in the wrapper compilers. However, per # in the wrapper compilers. However, per
# https://github.com/open-mpi/ompi/issues/259, we need to use # https://github.com/open-mpi/ompi/issues/259, we need to use