From 7055e9765e53a8df8bbcd5dec3a773c5e0b132e8 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Fri, 7 Apr 2006 04:57:53 +0000 Subject: [PATCH] Add the OMPI_SKIP_MPICXX to allow the user to avoid the inclusion of the CXX bindings if a C code is compiled with a CXX compiler. This commit was SVN r9567. --- NEWS | 3 +++ ompi/include/mpi.h.in | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 97151f0516..a97fb16a68 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,9 @@ version 1.0. 1.1 --- +- Add a define OMPI_SKIP_CXX to allow the user to skip the mpicxx.h from + being included in mpi.h. It allows the user to compile C code with a CXX + compiler without including the CXX bindings. - The PERUSE support is now available directly on the trunk. In order to activate it add --enable-peruse to the configure options. All events described in the PERUSE 2.0 draft are supported, plus one Open MPI diff --git a/ompi/include/mpi.h.in b/ompi/include/mpi.h.in index a4386bdac1..c676c0aa37 100644 --- a/ompi/include/mpi.h.in +++ b/ompi/include/mpi.h.in @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University + * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -1745,12 +1745,13 @@ OMPI_DECLSPEC double PMPI_Wtime(void); /* * Conditional MPI 2 C++ bindings support. Include if: + * - The user does not explicitly request us to skip it (when a C++ compiler + * is used to compile C code). * - We want C++ bindings support * - We are not building OMPI itself * - We are using a C++ compiler */ - -#if defined(OMPI_WANT_CXX_BINDINGS) && OMPI_WANT_CXX_BINDINGS && !OMPI_BUILDING +#if !defined(OMPI_SKIP_MPICXX) && OMPI_WANT_CXX_BINDINGS && !OMPI_BUILDING #if defined(__cplusplus) || defined(c_plusplus) #include "ompi/mpi/cxx/mpicxx.h" #endif