Skip to content

Commit

Permalink
Detect CXI via CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Nov 30, 2023
1 parent b237e6b commit 580cf23
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/DetectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,14 @@ if(ADIOS2_USE_SST AND NOT WIN32)
if(CrayDRC_FOUND)
set(ADIOS2_SST_HAVE_CRAY_DRC TRUE)
endif()

try_compile(ADIOS2_SST_HAVE_CRAY_CXI
${ADIOS2_BINARY_DIR}/check_libfabric_cxi
${ADIOS2_SOURCE_DIR}/cmake/check_libfabric_cxi.c
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${LIBFABRIC_INCLUDE_DIRS}"
"-DLINK_DIRECTORIES=${LIBFABRIC_LIBRARIES}")
message(STATUS "Libfabric support for the HPE CXI provider: ${ADIOS2_SST_HAVE_CRAY_CXI}")
endif()
if(ADIOS2_HAVE_MPI)
set(CMAKE_REQUIRED_LIBRARIES "MPI::MPI_C;Threads::Threads")
Expand Down
5 changes: 5 additions & 0 deletions cmake/check_libfabric_cxi.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <stdbool.h>
#include <rdma/fabric.h>
#include <rdma/fi_cxi_ext.h>

int main() {}

0 comments on commit 580cf23

Please sign in to comment.