diff --git a/bindings/CXX11/CMakeLists.txt b/bindings/CXX11/CMakeLists.txt index 6ac821bb52..a11452d04d 100644 --- a/bindings/CXX11/CMakeLists.txt +++ b/bindings/CXX11/CMakeLists.txt @@ -42,7 +42,7 @@ if(ADIOS2_HAVE_MPI) ) set_property(TARGET adios2_cxx11_mpi PROPERTY EXPORT_NAME cxx11_mpi) set_property(TARGET adios2_cxx11_mpi PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_cxx11_mpi) - target_link_libraries(adios2_cxx11_mpi PUBLIC adios2_cxx11 PRIVATE adios2_core_mpi PUBLIC MPI::MPI_CXX) + target_link_libraries(adios2_cxx11_mpi PUBLIC adios2_cxx11 PRIVATE adios2_core_mpi PUBLIC MPI::MPI_C) set(maybe_adios2_cxx11_mpi adios2_cxx11_mpi) target_compile_definitions(adios2_cxx11_mpi INTERFACE ADIOS2_USE_MPI) add_library(adios2::cxx11_mpi ALIAS adios2_cxx11_mpi) diff --git a/testing/install/CXX11/CMakeLists.txt b/testing/install/CXX11/CMakeLists.txt index d7dcca6a4f..c4890b39a0 100644 --- a/testing/install/CXX11/CMakeLists.txt +++ b/testing/install/CXX11/CMakeLists.txt @@ -4,7 +4,7 @@ #------------------------------------------------------------------------------# cmake_minimum_required(VERSION 3.6) -project(adios_cxx11_test CXX) +project(adios_cxx11_test LANGUAGES C CXX) enable_testing() find_package(adios2 REQUIRED) @@ -17,8 +17,9 @@ add_test(NAME adios_cxx11_test COMMAND adios_cxx11_test) if(ADIOS2_HAVE_MPI) find_package(MPI REQUIRED) set(src main_mpi.cxx) - set(mpilib MPI::MPI_CXX) + set(mpilib MPI::MPI_C) set(mpiexec ${MPIEXEC_EXECUTABLE} ${MPIEXEC_EXTRA_FLAGS}) + add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX) # Test using mpi C++11 bindings through adios2::cxx11_mpi target. add_executable(adios_cxx11_mpi_test main_mpi.cxx)