<commit_before>#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
  
add_library(adios2
  core/Attribute.cpp core/Attribute.tcc
  core/AttributeBase.cpp
  core/ADIOS.cpp
  core/Engine.cpp
  core/IO.cpp core/IO.tcc
  core/Selection.cpp
  core/SelectionBoundingBox.cpp
  core/SelectionPoints.cpp
  core/Transform.cpp core/Transform.tcc
  core/Variable.cpp core/Variable.tcc
  core/VariableBase.cpp
  core/VariableCompound.cpp core/VariableCompound.tcc
  
#helper
  helper/adiosDynamicBinder.h  helper/adiosDynamicBinder.cpp
  helper/adiosMath.cpp
  helper/adiosMPIFunctions.cpp
  helper/adiosString.cpp
  helper/adiosSystem.cpp
  helper/adiosType.cpp
  helper/adiosXML.cpp
  
#  engine/bp/BPFileReader.cpp
  engine/bp/BPFileWriter.cpp engine/bp/BPFileWriter.tcc

  engine/plugin/PluginEngine.h engine/plugin/PluginEngine.inl
  engine/plugin/PluginEngine.cpp
  engine/plugin/PluginEngineInterface.h engine/plugin/PluginEngineInterface.cpp

  toolkit/capsule/Capsule.cpp
  toolkit/capsule/heap/STLVector.cpp 
 
  toolkit/format/bp1/BP1Base.cpp toolkit/format/bp1/BP1Base.tcc
  toolkit/format/bp1/BP1Aggregator.cpp
  toolkit/format/bp1/BP1Writer.cpp toolkit/format/bp1/BP1Writer.tcc

  toolkit/profiling/iochrono/Timer.cpp

  toolkit/transport/Transport.cpp
  toolkit/transport/file/FilePointer.cpp
  toolkit/transport/file/FileStream.cpp
  
  toolkit/transportman/TransportMan.cpp
  
)
target_include_directories(adios2
  PUBLIC
    $<BUILD_INTERFACE:${ADIOS2_SOURCE_DIR}/source>
    $<BUILD_INTERFACE:${ADIOS2_BINARY_DIR}/source>
    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(adios2 PRIVATE adios2sys_interface pugixml)
target_link_libraries(adios2 PUBLIC ${CMAKE_THREAD_LIBS_INIT})

if(UNIX)
  target_sources(adios2 PRIVATE toolkit/transport/file/FileDescriptor.cpp)
endif()

if(ADIOS2_HAVE_SysVShMem)
  target_sources(adios2 PRIVATE toolkit/capsule/shmem/ShmSystemV.cpp)
endif()

if(ADIOS2_HAVE_DataMan)
  target_sources(adios2 PRIVATE
    engine/dataman/DataManReader.cpp
    engine/dataman/DataManWriter.cpp
  )
  target_link_libraries(adios2 PRIVATE dataman)
endif()
  
if(ADIOS2_HAVE_BZip2)
  target_sources(adios2 PRIVATE transform/compress/CompressBZip2.cpp)
  target_link_libraries(adios2 PRIVATE BZip2::BZip2)
endif()

if(ADIOS2_HAVE_ZFP)
  target_sources(adios2 PRIVATE transform/compress/CompressZfp.cpp)
  target_link_libraries(adios2 PRIVATE zfp::zfp)
endif()

if(ADIOS2_HAVE_MPI)
  target_include_directories(adios2 PUBLIC ${MPI_C_INCLUDE_PATH})
  target_link_libraries(adios2 PUBLIC ${MPI_C_LIBRARIES})
else()
  target_sources(adios2 PRIVATE mpidummy.cpp)
endif()

if(ADIOS2_HAVE_ADIOS1)
  target_sources(adios2 PRIVATE
    engine/adios1/ADIOS1Reader.cpp
    engine/adios1/ADIOS1Writer.cpp
    
    toolkit/interop/adios1/ADIOS1Common.cpp toolkit/interop/adios1/ADIOS1Common.tcc
    
  )
  target_link_libraries(adios2 PRIVATE adios1::adios)
endif()

if(ADIOS2_HAVE_HDF5)
  if(HDF5_C_INCLUDE_DIRS)
    target_include_directories(adios2 PRIVATE ${HDF5_C_INCLUDE_DIRS})<commit_msg>CMake: Port libadios2 to use the new FindMPI module<commit_after>#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
  
add_library(adios2
  core/Attribute.cpp core/Attribute.tcc
  core/AttributeBase.cpp
  core/ADIOS.cpp
  core/Engine.cpp
  core/IO.cpp core/IO.tcc
  core/Selection.cpp
  core/SelectionBoundingBox.cpp
  core/SelectionPoints.cpp
  core/Transform.cpp core/Transform.tcc
  core/Variable.cpp core/Variable.tcc
  core/VariableBase.cpp
  core/VariableCompound.cpp core/VariableCompound.tcc
  
#helper
  helper/adiosDynamicBinder.h  helper/adiosDynamicBinder.cpp
  helper/adiosMath.cpp
  helper/adiosMPIFunctions.cpp
  helper/adiosString.cpp
  helper/adiosSystem.cpp
  helper/adiosType.cpp
  helper/adiosXML.cpp
  
#  engine/bp/BPFileReader.cpp
  engine/bp/BPFileWriter.cpp engine/bp/BPFileWriter.tcc

  engine/plugin/PluginEngine.h engine/plugin/PluginEngine.inl
  engine/plugin/PluginEngine.cpp
  engine/plugin/PluginEngineInterface.h engine/plugin/PluginEngineInterface.cpp

  toolkit/capsule/Capsule.cpp
  toolkit/capsule/heap/STLVector.cpp 
 
  toolkit/format/bp1/BP1Base.cpp toolkit/format/bp1/BP1Base.tcc
  toolkit/format/bp1/BP1Aggregator.cpp
  toolkit/format/bp1/BP1Writer.cpp toolkit/format/bp1/BP1Writer.tcc

  toolkit/profiling/iochrono/Timer.cpp

  toolkit/transport/Transport.cpp
  toolkit/transport/file/FilePointer.cpp
  toolkit/transport/file/FileStream.cpp
  
  toolkit/transportman/TransportMan.cpp
  
)
target_include_directories(adios2
  PUBLIC
    $<BUILD_INTERFACE:${ADIOS2_SOURCE_DIR}/source>
    $<BUILD_INTERFACE:${ADIOS2_BINARY_DIR}/source>
    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(adios2 PRIVATE adios2sys_interface pugixml)
target_link_libraries(adios2 PUBLIC ${CMAKE_THREAD_LIBS_INIT})

if(UNIX)
  target_sources(adios2 PRIVATE toolkit/transport/file/FileDescriptor.cpp)
endif()

if(ADIOS2_HAVE_SysVShMem)
  target_sources(adios2 PRIVATE toolkit/capsule/shmem/ShmSystemV.cpp)
endif()

if(ADIOS2_HAVE_DataMan)
  target_sources(adios2 PRIVATE
    engine/dataman/DataManReader.cpp
    engine/dataman/DataManWriter.cpp
  )
  target_link_libraries(adios2 PRIVATE dataman)
endif()
  
if(ADIOS2_HAVE_BZip2)
  target_sources(adios2 PRIVATE transform/compress/CompressBZip2.cpp)
  target_link_libraries(adios2 PRIVATE BZip2::BZip2)
endif()

if(ADIOS2_HAVE_ZFP)
  target_sources(adios2 PRIVATE transform/compress/CompressZfp.cpp)
  target_link_libraries(adios2 PRIVATE zfp::zfp)
endif()

if(ADIOS2_HAVE_MPI)
  target_link_libraries(adios2 PUBLIC MPI::MPI_C)
else()
  target_sources(adios2 PRIVATE mpidummy.cpp)
endif()

if(ADIOS2_HAVE_ADIOS1)
  target_sources(adios2 PRIVATE
    engine/adios1/ADIOS1Reader.cpp
    engine/adios1/ADIOS1Writer.cpp
    
    toolkit/interop/adios1/ADIOS1Common.cpp toolkit/interop/adios1/ADIOS1Common.tcc
    
  )
  target_link_libraries(adios2 PRIVATE adios1::adios)
endif()

if(ADIOS2_HAVE_HDF5)
  if(HDF5_C_INCLUDE_DIRS)
    target_include_directories(adios2 PRIVATE ${HDF5_C_INCLUDE_DIRS})
{'fraction_non_alphanumeric': 0.1346629560915275, 'fraction_numerical': 0.017625231910946195, 'mean_word_length': 4.02251552795031, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5497976', 'n_tokens_mistral': 2456, 'n_tokens_neox': 2359, 'n_words': 278}