2
0
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:
LXYan2333
2024-10-14 22:25:00 +08:00
parent 77a8b42ba7
commit 7100c9ef7c
2 changed files with 3 additions and 8 deletions

View File

@@ -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()

View File

@@ -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>