Skip to content

Commit

Permalink
CMAKE: Remove unneeded MPI_CXX dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Vicente Adolfo Bolea Sanchez <[email protected]>
  • Loading branch information
vicentebolea committed Jul 8, 2021
1 parent 53b5d8b commit 8f61a22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bindings/CXX11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions testing/install/CXX11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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_compile_definitions(OMPI_SKIP_MPICXX MPICH_SKIP_MPICXX)

# Test using mpi C++11 bindings through adios2::cxx11_mpi target.
add_executable(adios_cxx11_mpi_test main_mpi.cxx)
Expand Down

0 comments on commit 8f61a22

Please sign in to comment.