1
1
openmpi/opal/include/CMakeLists.txt
Shiqing Fan b8db8d0ef8 Need to change another variable name.
This commit was SVN r23556.
2010-08-05 12:38:28 +00:00

32 строки
1.4 KiB
CMake

#
# Copyright (c) 2007-2010 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2008 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# make a temporary copy of the input file
FILE(READ ${OpenMPI_SOURCE_DIR}/ompi/include/mpi.h.in MPI_H_IN)
# change the syntax of the copy into CMake understandable
STRING(REGEX REPLACE "#undef ([-_a-zA-Z0-9]+)[ ]*\n" "#cmakedefine \\1 \${\\1}\n" MPI_H_OUT "${MPI_H_IN}")
STRING(REPLACE "#cmakedefine OMPI_HAVE_FORTRAN_" "#define OMPI_HAVE_FORTRAN_" MPI_H_OUT "${MPI_H_OUT}")
STRING(REPLACE "{OMPI_PROVIDE_MPI_FILE_INTERFACE}"
"{OMPI_PROVIDE_MPI_FILE_INTERFACE_VAL}" MPI_H_OUT "${MPI_H_OUT}")
FILE(WRITE ${OpenMPI_BINARY_DIR}/ompi/include/mpi.h.in "${MPI_H_OUT}")
# generate mpi.h
CONFIGURE_FILE(${OpenMPI_BINARY_DIR}/ompi/include/mpi.h.in ${OpenMPI_BINARY_DIR}/ompi/include/mpi.h)
IF(OMPI_WANT_F77_BINDINGS)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/ompi/include/mpif.h.in ${OpenMPI_BINARY_DIR}/ompi/include/mpif.h)
CONFIGURE_FILE(${OpenMPI_SOURCE_DIR}/ompi/include/mpif-config.h.in ${OpenMPI_BINARY_DIR}/ompi/include/mpif-config.h)
ENDIF(OMPI_WANT_F77_BINDINGS)