<commit_before># -*- cmake -*-

MACRO(ADD_TORCH_PACKAGE package src luasrc)
  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
  INCLUDE_DIRECTORIES(${Torch_LUA_INCLUDE_DIR})

 ### C/C++ sources
 # As per CMake doc, macro arguments are not variables, so simple test syntax not working
  IF(NOT "${src}" STREQUAL "")

    ADD_LIBRARY(${package} MODULE ${src})
    if(BUILD_STATIC)
      ADD_LIBRARY(${package}_static STATIC ${src})
    endif()

    ### Torch packages supposes libraries prefix is "lib"
    SET_TARGET_PROPERTIES(${package} PROPERTIES
      PREFIX "lib"<commit_msg>Added recognition of CUDA sources in ADD_TORCH_PACKAGE<commit_after># -*- cmake -*-

MACRO(ADD_TORCH_PACKAGE package src luasrc)
  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
  INCLUDE_DIRECTORIES(${Torch_LUA_INCLUDE_DIR})

 ### C/C++ sources
 # As per CMake doc, macro arguments are not variables, so simple test syntax not working
  IF(NOT "${src}" STREQUAL "")

    if ("${src}" MATCHES "cu$" OR "${src}" MATCHES "cu;")
      CUDA_ADD_LIBRARY(${package} MODULE ${src})
      if(BUILD_STATIC)
        CUDA_ADD_LIBRARY(${package}_static STATIC ${src})
      endif()
    else()
      ADD_LIBRARY(${package} MODULE ${src})
      if(BUILD_STATIC)
        ADD_LIBRARY(${package}_static STATIC ${src})
      endif()
    endif()

    ### Torch packages supposes libraries prefix is "lib"
    SET_TARGET_PROPERTIES(${package} PROPERTIES
      PREFIX "lib"
{'fraction_non_alphanumeric': 0.12831241283124128, 'fraction_numerical': 0.0, 'mean_word_length': 4.256410256410256, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2192651', 'n_tokens_mistral': 514, 'n_tokens_neox': 469, 'n_words': 117}