mirror of
https://github.com/boostorg/mpi.git
synced 2026-01-19 04:22:10 +00:00
Use CMake's MPI_CXX_SKIP_MPICXX to add macro to disable MPI 2.0's CXX binding
This commit is contained in:
@@ -62,8 +62,9 @@ target_link_libraries(boost_mpi
|
||||
|
||||
if(BOOST_ENABLE_MPI)
|
||||
|
||||
find_package(MPI REQUIRED COMPONENTS C)
|
||||
target_link_libraries(boost_mpi PUBLIC MPI::MPI_C)
|
||||
set(MPI_CXX_SKIP_MPICXX ON)
|
||||
find_package(MPI REQUIRED COMPONENTS CXX)
|
||||
target_link_libraries(boost_mpi PUBLIC MPI::MPI_CXX)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
@@ -13,12 +13,6 @@
|
||||
#ifndef BOOST_MPI_CONFIG_HPP
|
||||
#define BOOST_MPI_CONFIG_HPP
|
||||
|
||||
/* Force MPICH not to define SEEK_SET, SEEK_CUR, and SEEK_END, which
|
||||
conflict with the versions in <stdio.h> and <cstdio>. */
|
||||
#define MPICH_IGNORE_CXX_SEEK 1
|
||||
/* We do not want to link in the OpenMPI CXX stuff */
|
||||
#define OMPI_SKIP_MPICXX
|
||||
|
||||
#include <mpi.h>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user