1
1
openmpi/ompi/mpi/fortran/configure-fortran-output-bottom.h
Jeff Squyres 5f17bc3c2c Make the use of PROTECTED in the mpi_f08 module be optional.
Add a configure test to see if the Fortran compiler supports the
PROTECTED keyword.  If it does, use in mpi-f08-types.F90 (via a macro
defined in configure-fortran-output-bottom.h).

This is needed to support the PGI 9 Fortran compiler, which does not
support the PROTECTED keyword.

Note that regardless of whether we want to support the PGI 9 Fortran
compiler + mpi_f08, we need to correctly detect whether PROTECTED
works or not, and then use that determination as a criteria for
building the mpi_f08 module.  Previously, mpi-f08-types.F90 used
PROTECTED unconditionally, and we didn't test for it in configure.  So
if a compiler (e.g., PGI 9) supported everything else but didn't
support PROTECTED, it would try to compile the mpi_f08 stuff and choke
on the use of PROTECTED.

Refs trac:4093

This commit was SVN r30273.

The following Trac tickets were found above:
  Ticket 4093 --> https://svn.open-mpi.org/trac/ompi/ticket/4093
2014-01-13 18:35:42 +00:00

56 строки
1.1 KiB
Fortran

! -*- fortran -*-
!
! Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
!
! $COPYRIGHT$
!
! Additional copyrights may follow
!
! $HEADER$
!
! This file is included after configure-fortran-output.h, and does some
! conditional logic based on the #define's values from that file.
#ifndef OMPI_FORTRAN_CONFIGURE_OUTPUT_BOTTOM_H
#define OMPI_FORTRAN_CONFIGURE_OUTPUT_BOTTOM_H
! PROCEDURE or not
#if OMPI_FORTRAN_HAVE_PROCEDURE
#define OMPI_PROCEDURE(name) PROCEDURE(name)
#else
#define OMPI_PROCEDURE(name) EXTERNAL
#endif
! ABSTRACT or not
#if OMPI_FORTRAN_HAVE_ABSTRACT
#define OMPI_ABSTRACT ABSTRACT
#else
#define OMPI_ABSTRACT
#endif
! ASYNCHRONOUS or not
#if OMPI_FORTRAN_HAVE_ASYNCHRONOUS
#define OMPI_ASYNCHRONOUS , ASYNCHRONOUS
#else
#define OMPI_ASYNCHRONOUS
#endif
! PRIVATE or not
#if OMPI_FORTRAN_HAVE_PRIVATE
#define OMPI_PRIVATE , PRIVATE
#else
#define OMPI_PRIVATE
#endif
! PROTECTED or not
#if OMPI_FORTRAN_HAVE_PROTECTED
#define OMPI_PROTECTED , PROTECTED
#else
#define OMPI_PROTECTED
#endif
#endif