diff --git a/modules/mpi/include/ReplicaExchange.h b/modules/mpi/include/ReplicaExchange.h index f5e4a9c009..1678cd1071 100644 --- a/modules/mpi/include/ReplicaExchange.h +++ b/modules/mpi/include/ReplicaExchange.h @@ -14,9 +14,15 @@ #include // We only want the C API, so try to suppress the C++ API +#ifndef MPICH_SKIP_MPICXX #define MPICH_SKIP_MPICXX +#endif +#ifndef OMPI_SKIP_MPICXX #define OMPI_SKIP_MPICXX +#endif +#ifndef _MPICC_H #define _MPICC_H +#endif #include IMPMPI_BEGIN_NAMESPACE diff --git a/modules/mpi/src/ReplicaExchange.cpp b/modules/mpi/src/ReplicaExchange.cpp index 8fc021e74d..3a4849b528 100644 --- a/modules/mpi/src/ReplicaExchange.cpp +++ b/modules/mpi/src/ReplicaExchange.cpp @@ -9,9 +9,15 @@ #include // We only want the C API, so try to suppress the C++ API +#ifndef MPICH_SKIP_MPICXX #define MPICH_SKIP_MPICXX +#endif +#ifndef OMPI_SKIP_MPICXX #define OMPI_SKIP_MPICXX +#endif +#ifndef _MPICC_H #define _MPICC_H +#endif #include "mpi.h" #include diff --git a/modules/mpi/src/internal/mpi_helpers.cpp b/modules/mpi/src/internal/mpi_helpers.cpp index 39524b4848..0fd8f7e378 100644 --- a/modules/mpi/src/internal/mpi_helpers.cpp +++ b/modules/mpi/src/internal/mpi_helpers.cpp @@ -8,9 +8,15 @@ #include // We only want the C API, so try to suppress the C++ API +#ifndef MPICH_SKIP_MPICXX #define MPICH_SKIP_MPICXX +#endif +#ifndef OMPI_SKIP_MPICXX #define OMPI_SKIP_MPICXX +#endif +#ifndef _MPICC_H #define _MPICC_H +#endif #include "mpi.h" #if defined(OMPI_MAJOR_VERSION) && !defined(_MSC_VER) diff --git a/modules/mpi/utility/hello_world.cpp b/modules/mpi/utility/hello_world.cpp index 95cd57a52a..91be8669a9 100644 --- a/modules/mpi/utility/hello_world.cpp +++ b/modules/mpi/utility/hello_world.cpp @@ -5,9 +5,15 @@ #include // We only want the C API, so try to suppress the C++ API +#ifndef MPICH_SKIP_MPICXX #define MPICH_SKIP_MPICXX +#endif +#ifndef OMPI_SKIP_MPICXX #define OMPI_SKIP_MPICXX +#endif +#ifndef _MPICC_H #define _MPICC_H +#endif #include static int numprocs; diff --git a/modules/spb/bin/spb.cpp b/modules/spb/bin/spb.cpp index 93d6af6aba..78fca129b4 100644 --- a/modules/spb/bin/spb.cpp +++ b/modules/spb/bin/spb.cpp @@ -20,9 +20,15 @@ #include // We only want the C API, so try to suppress the C++ API +#ifndef MPICH_SKIP_MPICXX #define MPICH_SKIP_MPICXX +#endif +#ifndef OMPI_SKIP_MPICXX #define OMPI_SKIP_MPICXX +#endif +#ifndef _MPICC_H #define _MPICC_H +#endif #include "mpi.h" using namespace IMP; diff --git a/modules/spb/bin/spb_density_perbead.cpp b/modules/spb/bin/spb_density_perbead.cpp index e0db922ab1..169d34ab36 100644 --- a/modules/spb/bin/spb_density_perbead.cpp +++ b/modules/spb/bin/spb_density_perbead.cpp @@ -18,9 +18,15 @@ #include // We only want the C API, so try to suppress the C++ API +#ifndef MPICH_SKIP_MPICXX #define MPICH_SKIP_MPICXX +#endif +#ifndef OMPI_SKIP_MPICXX #define OMPI_SKIP_MPICXX +#endif +#ifndef _MPICC_H #define _MPICC_H +#endif #include "mpi.h" using namespace IMP;