<commit_before># Copyright (C) 1995-2019, <NAME> and <NAME>.
# All rights reserved.
#
# For the licensing terms see $ROOTSYS/LICENSE.
# For the list of contributors see $ROOTSYS/README/CREDITS.

############################################################################
# CMakeLists.txt file for building ROOT io/io package
############################################################################

if (WIN32)
  set(rawfile_local_headers ROOT/RRawFileWin.hxx)
  set(rawfile_local_sources src/RRawFileWin.cxx)
else ()
  set(rawfile_local_headers ROOT/RRawFileUnix.hxx)
  set(rawfile_local_sources src/RRawFileUnix.cxx)
  if (uring)
    list(APPEND rawfile_local_headers ROOT/RIoUring.hxx)
  endif ()
endif ()

ROOT_LINKER_LIBRARY(RIO
  src/RRawFile.cxx
  ${rawfile_local_sources}
  src/TArchiveFile.cxx
  src/TBufferFile.cxx
  src/TBufferText.cxx
  src/TBufferIO.cxx
  src/TBufferJSON.cxx
  src/TBufferMerger.cxx
  src/TBufferMergerFile.cxx
  src/TCollectionProxyFactory.cxx
  src/TContainerConverters.cxx
  src/TEmulatedMapProxy.cxx
  src/TEmulatedCollectionProxy.cxx
  src/TDirectoryFile.cxx
  src/TFileCacheRead.cxx
  src/TFileMerger.cxx
  src/TFree.cxx
  src/TFileCacheWrite.cxx
  src/TFilePrefetch.cxx
  src/TFile.cxx
  src/TFPBlock.cxx
  src/TGenCollectionStreamer.cxx
  src/TGenCollectionProxy.cxx
  src/TKey.cxx
  src/TKeyMapFile.cxx
  src/TLockFile.cxx
  src/TMemFile.cxx
  src/TMapFile.cxx
  src/TMakeProject.cxx
  src/TStreamerInfo.cxx
  src/TStreamerInfoActions.cxx
  src/TStreamerInfoReadBuffer.cxx
  src/TStreamerInfoWriteBuffer.cxx
  src/TZIPFile.cxx
  $<TARGET_OBJECTS:RootPcmObjs>
  LIBRARIES
    ${CMAKE_DL_LIBS}
    ${ROOT_ATOMIC_LIBS}
  DEPENDENCIES
    Core
    Thread
)

target_include_directories(RIO PRIVATE ${CMAKE_SOURCE_DIR}/core/clib/res)

if(root7)
  set(RIO_EXTRA_HEADERS ROOT/RFile.hxx)
  target_sources(RIO PRIVATE v7/src/RFile.cxx)
endif()

if(uring)
  target_compile_definitions(RIO PRIVATE HAVE_LIBURING)
endif()

ROOT_GENERATE_DICTIONARY(G__RIO
  ROOT/RRawFile.hxx
  ${rawfile_local_headers}
  ROOT/TBufferMerger.hxx
  TArchiveFile.h
  TBufferFile.h
  TBufferText.h
  TBufferIO.h
  TBufferJSON.h
  TCollectionProxyFactory.h
  TContainerConverters.h
  TEmulatedMapProxy.h
  TEmulatedCollectionProxy.h
  TDirectoryFile.h
  TFileCacheRead.h
  TFileMerger.h
  TFree.h
  TFileCacheWrite.h
  TFilePrefetch.h
  TFile.h
  TFPBlock.h
  TGenCollectionStreamer.h
  TGenCollectionProxy.h
  TKey.h
  TKeyMapFile.h
  TLockFile.h
  TMemFile.h
  TMapFile.h
  TMakeProject.h
  TStreamerInfoActions.h
  TVirtualCollectionIterators.h
  TStreamerInfo.h
  TZIPFile.h
  ${RIO_EXTRA_HEADERS}
  STAGE1
  MODULE
    RIO
  LINKDEF
    LinkDef.h
  OPTIONS
    -writeEmptyRootPCM
  DEPENDENCIES
    Core
    Thread
)

# TStreamerInfoReadBuffer in O0 needs 6k on the stack. It is called
# recursively, quickly exhausting the stack. Prevent that by forcing
# the many scope-local vars to share their stack space / become
# registers, thanks to the optimizer.
if(MSVC)
  set_source_files_properties(src/TStreamerInfoReadBuffer.cxx COMPILE_FLAGS "/O2")
else()
  set_source_files_properties(src/TStreamerInfoReadBuffer.cxx COMPILE_FLAGS "-O3")
endif()

ROOT_INSTALL_HEADERS()

ROOT_ADD_TEST_SUBDIRECTORY(test)
<commit_msg>[CMake] actually link against uring<commit_after># Copyright (C) 1995-2019, <NAME> and <NAME>.
# All rights reserved.
#
# For the licensing terms see $ROOTSYS/LICENSE.
# For the list of contributors see $ROOTSYS/README/CREDITS.

############################################################################
# CMakeLists.txt file for building ROOT io/io package
############################################################################

if (WIN32)
  set(rawfile_local_headers ROOT/RRawFileWin.hxx)
  set(rawfile_local_sources src/RRawFileWin.cxx)
else ()
  set(rawfile_local_headers ROOT/RRawFileUnix.hxx)
  set(rawfile_local_sources src/RRawFileUnix.cxx)
  if (uring)
    list(APPEND rawfile_local_headers ROOT/RIoUring.hxx)
  endif ()
endif ()

ROOT_LINKER_LIBRARY(RIO
  src/RRawFile.cxx
  ${rawfile_local_sources}
  src/TArchiveFile.cxx
  src/TBufferFile.cxx
  src/TBufferText.cxx
  src/TBufferIO.cxx
  src/TBufferJSON.cxx
  src/TBufferMerger.cxx
  src/TBufferMergerFile.cxx
  src/TCollectionProxyFactory.cxx
  src/TContainerConverters.cxx
  src/TEmulatedMapProxy.cxx
  src/TEmulatedCollectionProxy.cxx
  src/TDirectoryFile.cxx
  src/TFileCacheRead.cxx
  src/TFileMerger.cxx
  src/TFree.cxx
  src/TFileCacheWrite.cxx
  src/TFilePrefetch.cxx
  src/TFile.cxx
  src/TFPBlock.cxx
  src/TGenCollectionStreamer.cxx
  src/TGenCollectionProxy.cxx
  src/TKey.cxx
  src/TKeyMapFile.cxx
  src/TLockFile.cxx
  src/TMemFile.cxx
  src/TMapFile.cxx
  src/TMakeProject.cxx
  src/TStreamerInfo.cxx
  src/TStreamerInfoActions.cxx
  src/TStreamerInfoReadBuffer.cxx
  src/TStreamerInfoWriteBuffer.cxx
  src/TZIPFile.cxx
  $<TARGET_OBJECTS:RootPcmObjs>
  LIBRARIES
    ${CMAKE_DL_LIBS}
    ${ROOT_ATOMIC_LIBS}
  DEPENDENCIES
    Core
    Thread
)

target_include_directories(RIO PRIVATE ${CMAKE_SOURCE_DIR}/core/clib/res)

if(root7)
  set(RIO_EXTRA_HEADERS ROOT/RFile.hxx)
  target_sources(RIO PRIVATE v7/src/RFile.cxx)
endif()

if(uring)
  target_compile_definitions(RIO PRIVATE HAVE_LIBURING)
  target_link_libraries(RIO PRIVATE uring)
endif()

ROOT_GENERATE_DICTIONARY(G__RIO
  ROOT/RRawFile.hxx
  ${rawfile_local_headers}
  ROOT/TBufferMerger.hxx
  TArchiveFile.h
  TBufferFile.h
  TBufferText.h
  TBufferIO.h
  TBufferJSON.h
  TCollectionProxyFactory.h
  TContainerConverters.h
  TEmulatedMapProxy.h
  TEmulatedCollectionProxy.h
  TDirectoryFile.h
  TFileCacheRead.h
  TFileMerger.h
  TFree.h
  TFileCacheWrite.h
  TFilePrefetch.h
  TFile.h
  TFPBlock.h
  TGenCollectionStreamer.h
  TGenCollectionProxy.h
  TKey.h
  TKeyMapFile.h
  TLockFile.h
  TMemFile.h
  TMapFile.h
  TMakeProject.h
  TStreamerInfoActions.h
  TVirtualCollectionIterators.h
  TStreamerInfo.h
  TZIPFile.h
  ${RIO_EXTRA_HEADERS}
  STAGE1
  MODULE
    RIO
  LINKDEF
    LinkDef.h
  OPTIONS
    -writeEmptyRootPCM
  DEPENDENCIES
    Core
    Thread
)

# TStreamerInfoReadBuffer in O0 needs 6k on the stack. It is called
# recursively, quickly exhausting the stack. Prevent that by forcing
# the many scope-local vars to share their stack space / become
# registers, thanks to the optimizer.
if(MSVC)
  set_source_files_properties(src/TStreamerInfoReadBuffer.cxx COMPILE_FLAGS "/O2")
else()
  set_source_files_properties(src/TStreamerInfoReadBuffer.cxx COMPILE_FLAGS "-O3")
endif()

ROOT_INSTALL_HEADERS()

ROOT_ADD_TEST_SUBDIRECTORY(test)

{'fraction_non_alphanumeric': 0.1220297409167561, 'fraction_numerical': 0.005212325617047371, 'mean_word_length': 4.633851468048359, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '311637', 'n_tokens_mistral': 2584, 'n_tokens_neox': 2521, 'n_words': 397}