<commit_before>#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
add_library(sst OBJECT
  dp/dp.c
  dp/evpath_dp.c
  cp/cp_reader.c
  cp/cp_writer.c
  cp/cp_common.c
  cp/ffs_marshal.c
  sst_comm.cpp
)
if(BUILD_SHARED_LIBS)
  set_property(TARGET sst PROPERTY POSITION_INDEPENDENT_CODE 1)
endif()

target_link_libraries(sst PRIVATE taustubs)

if(ADIOS2_SST_HAVE_LIBFABRIC)
  target_sources(sst PRIVATE dp/rdma_dp.c)
  target_link_libraries(sst PRIVATE libfabric::libfabric)
  set(CMAKE_REQUIRED_INCLUDES ${LIBFABRIC_INCLUDE_DIRS})
  CHECK_INCLUDE_FILE(rdma/fi_ext_gni.h ADIOS2_SST_HAVE_FI_GNI)
  if(ADIOS2_SST_HAVE_CRAY_DRC)
    target_link_libraries(sst PRIVATE craydrc::craydrc)
  endif()
endif()

if(ADIOS2_SST_HAVE_NVStream)
  target_sources(sst PRIVATE dp/nvstream_dp.c dp/nvswrapper.cpp)
  target_link_libraries(sst PRIVATE NVStream::NVStream ${Boost_LIBRARIES})
  set(CMAKE_REQUIRED_INCLUDES ${NVSTREAM_INCLUDE_DIRS})
endif()

if(ADIOS2_HAVE_ZFP)
  target_sources(sst PRIVATE cp/ffs_zfp.c)
  target_link_libraries(sst PRIVATE zfp::zfp)
endif()

# Set library version information
set_target_properties(sst PROPERTIES
  OUTPUT_NAME adios2_sst
  VERSION ${ADIOS2_LIBRARY_VERSION}
  SOVERSION ${ADIOS2_VERSION_MAJOR}
)

#------------------------------------------------------------------------------#
# Generate SST defines
#------------------------------------------------------------------------------#
set(SST_CONFIG_OPTS
  LIBFABRIC
  FI_GNI
  CRAY_DRC
  NVStream
)
include(SSTFunctions)
GenerateSSTHeaderConfig(${SST_CONFIG_OPTS})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/SSTConfig.h
  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/adios2/toolkit/sst
)

if (NOT MSVC)
  target_compile_features(sst PRIVATE ${ADIOS2_C99_FEATURES})
endif()

target_include_directories(sst PRIVATE
  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/source>
  $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/source>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)
target_link_libraries(sst PRIVATE adios2::thirdparty::EVPath)
if(ADIOS2_HAVE_MPI)
  target_link_libraries(sst PRIVATE MPI::MPI_C)
endif()

if(NOT BUILD_SHARED_LIBS)
  # When sst is included in a static library we must export the
  # target so that consumers know the link dependencies.
  install(TARGETS sst EXPORT adios2Exports)<commit_msg>sst: Drop unnecessary link to MPI library<commit_after>#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
add_library(sst OBJECT
  dp/dp.c
  dp/evpath_dp.c
  cp/cp_reader.c
  cp/cp_writer.c
  cp/cp_common.c
  cp/ffs_marshal.c
  sst_comm.cpp
)
if(BUILD_SHARED_LIBS)
  set_property(TARGET sst PROPERTY POSITION_INDEPENDENT_CODE 1)
endif()

target_link_libraries(sst PRIVATE taustubs)

if(ADIOS2_SST_HAVE_LIBFABRIC)
  target_sources(sst PRIVATE dp/rdma_dp.c)
  target_link_libraries(sst PRIVATE libfabric::libfabric)
  set(CMAKE_REQUIRED_INCLUDES ${LIBFABRIC_INCLUDE_DIRS})
  CHECK_INCLUDE_FILE(rdma/fi_ext_gni.h ADIOS2_SST_HAVE_FI_GNI)
  if(ADIOS2_SST_HAVE_CRAY_DRC)
    target_link_libraries(sst PRIVATE craydrc::craydrc)
  endif()
endif()

if(ADIOS2_SST_HAVE_NVStream)
  target_sources(sst PRIVATE dp/nvstream_dp.c dp/nvswrapper.cpp)
  target_link_libraries(sst PRIVATE NVStream::NVStream ${Boost_LIBRARIES})
  set(CMAKE_REQUIRED_INCLUDES ${NVSTREAM_INCLUDE_DIRS})
endif()

if(ADIOS2_HAVE_ZFP)
  target_sources(sst PRIVATE cp/ffs_zfp.c)
  target_link_libraries(sst PRIVATE zfp::zfp)
endif()

# Set library version information
set_target_properties(sst PROPERTIES
  OUTPUT_NAME adios2_sst
  VERSION ${ADIOS2_LIBRARY_VERSION}
  SOVERSION ${ADIOS2_VERSION_MAJOR}
)

#------------------------------------------------------------------------------#
# Generate SST defines
#------------------------------------------------------------------------------#
set(SST_CONFIG_OPTS
  LIBFABRIC
  FI_GNI
  CRAY_DRC
  NVStream
)
include(SSTFunctions)
GenerateSSTHeaderConfig(${SST_CONFIG_OPTS})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/SSTConfig.h
  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/adios2/toolkit/sst
)

if (NOT MSVC)
  target_compile_features(sst PRIVATE ${ADIOS2_C99_FEATURES})
endif()

target_include_directories(sst PRIVATE
  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/source>
  $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/source>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)
target_link_libraries(sst PRIVATE adios2::thirdparty::EVPath)

if(NOT BUILD_SHARED_LIBS)
  # When sst is included in a static library we must export the
  # target so that consumers know the link dependencies.
  install(TARGETS sst EXPORT adios2Exports)
{'fraction_non_alphanumeric': 0.20083102493074792, 'fraction_numerical': 0.006925207756232687, 'mean_word_length': 3.2766497461928936, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3003769', 'n_tokens_mistral': 1905, 'n_tokens_neox': 1813, 'n_words': 288}