<commit_before>#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#

set(dataman_targets)

add_library(dataman DataMan.cpp DataManBase.cpp)
target_include_directories(dataman PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(dataman PRIVATE adios2sys)
list(APPEND dataman_targets dataman)

# Add the dataman plugins as MODULE libraries instead of SHARED libraries.
# MODULE libraries are designed to be plugins, i.e. shared libs that nobody
# else links to.

add_library(dumpman MODULE DumpMan.h DumpMan.cpp)
target_link_libraries(dumpman PRIVATE dataman)
list(APPEND dataman_targets dumpman)

add_library(temporalman MODULE TemporalMan.h TemporalMan.cpp)
target_link_libraries(temporalman PRIVATE dataman)
list(APPEND dataman_targets temporalman)

add_library(streamman OBJECT StreamMan.h StreamMan.cpp)

option(ADIOS_USE_DataMan_ZeroMQ "Enable ZeroMQ for DataMan" OFF)
if(ADIOS_USE_DataMan_ZeroMQ)
  find_package(ZeroMQ REQUIRED)

  add_library(zmqman MODULE
    ZmqMan.h ZmqMan.cpp
    $<TARGET_OBJECTS:streamman>
  )
  target_link_libraries(zmqman PRIVATE dataman ZeroMQ::ZMQ)
  list(APPEND dataman_targets zmqman)

  add_library(mdtmman MODULE
    MdtmMan.h MdtmMan.cpp
    $<TARGET_OBJECTS:streamman>
  )
  target_link_libraries(mdtmman PRIVATE dataman ZeroMQ::ZMQ)
  list(APPEND dataman_targets mdtmman)
endif()


set(ADIOS_USE_DataMan_ZFP ${ADIOS_USE_ZFP} CACHE INTERNAL "Enable ZFP for DataMan" FORCE)
if(ADIOS_USE_DataMan_ZFP)
  find_package(ZFP REQUIRED)

  add_library(zfpman MODULE ZfpMan.h ZfpMan.cpp)
  target_link_libraries(zfpman PRIVATE dataman zfp::zfp)<commit_msg>some other changes to DataMan/CMakeLists.txt for ZMQ dependency<commit_after>#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#

set(dataman_targets)

add_library(dataman DataMan.cpp DataManBase.cpp)
target_include_directories(dataman PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(dataman PRIVATE adios2sys)
list(APPEND dataman_targets dataman)

# Add the dataman plugins as MODULE libraries instead of SHARED libraries.
# MODULE libraries are designed to be plugins, i.e. shared libs that nobody
# else links to.

add_library(dumpman MODULE DumpMan.h DumpMan.cpp)
target_link_libraries(dumpman PRIVATE dataman)
list(APPEND dataman_targets dumpman)

add_library(temporalman MODULE TemporalMan.h TemporalMan.cpp)
target_link_libraries(temporalman PRIVATE dataman)
list(APPEND dataman_targets temporalman)

option(ADIOS_USE_DataMan_ZeroMQ "Enable ZeroMQ for DataMan" OFF)
if(ADIOS_USE_DataMan_ZeroMQ)
  find_package(ZeroMQ REQUIRED)

  # Manually add the ZeroMQ_INCLUDE_DIRS since object libs still don't support
  # target usage requirements
  add_library(streamman OBJECT StreamMan.h StreamMan.cpp)
  target_include_directories(streamman PRIVATE ${ZeroMQ_INCLUDE_DIRS})

  add_library(zmqman MODULE
    ZmqMan.h ZmqMan.cpp
    $<TARGET_OBJECTS:streamman>
  )
  target_link_libraries(zmqman PRIVATE dataman ZeroMQ::ZMQ)
  list(APPEND dataman_targets zmqman)

  add_library(mdtmman MODULE
    MdtmMan.h MdtmMan.cpp
    $<TARGET_OBJECTS:streamman>
  )
  target_link_libraries(mdtmman PRIVATE dataman ZeroMQ::ZMQ)
  list(APPEND dataman_targets mdtmman)
endif()


set(ADIOS_USE_DataMan_ZFP ${ADIOS_USE_ZFP} CACHE INTERNAL "Enable ZFP for DataMan" FORCE)
if(ADIOS_USE_DataMan_ZFP)
  find_package(ZFP REQUIRED)

  add_library(zfpman MODULE ZfpMan.h ZfpMan.cpp)
  target_link_libraries(zfpman PRIVATE dataman zfp::zfp)
{'fraction_non_alphanumeric': 0.14263565891472868, 'fraction_numerical': 0.0015503875968992248, 'mean_word_length': 3.975578406169666, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7461099', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1260, 'n_words': 286}