diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake index fed08da4c2..55ed506970 100644 --- a/cmake/DetectOptions.cmake +++ b/cmake/DetectOptions.cmake @@ -394,6 +394,9 @@ if(ADIOS2_USE_SST AND NOT WIN32) }]=] ADIOS2_HAVE_MPI_CLIENT_SERVER) unset(CMAKE_REQUIRED_LIBRARIES) + if (ADIOS2_HAVE_MPI_CLIENT_SERVER) + set(ADIOS2_SST_HAVE_MPI TRUE) + endif() endif() # UCX if(ADIOS2_USE_UCX STREQUAL AUTO) diff --git a/source/adios2/toolkit/sst/CMakeLists.txt b/source/adios2/toolkit/sst/CMakeLists.txt index b42230ce3e..5f6a1875e2 100644 --- a/source/adios2/toolkit/sst/CMakeLists.txt +++ b/source/adios2/toolkit/sst/CMakeLists.txt @@ -45,7 +45,7 @@ if(ADIOS2_HAVE_ZFP) target_link_libraries(sst PRIVATE zfp::zfp) endif() -if(ADIOS2_HAVE_MPI_CLIENT_SERVER) +if(ADIOS2_SST_HAVE_MPI) target_sources(sst PRIVATE dp/mpi_dp.c) target_link_libraries(sst PRIVATE MPI::MPI_C) endif()