<commit_before>cmake_minimum_required (VERSION 2.6)

set(test-files molch-init.backup molch-init-backup.key)

# copy all test files to the test binary dir
foreach(test-file ${test-files})
    execute_process(COMMAND cmake -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/${test-file}" "${CMAKE_CURRENT_BINARY_DIR}/${test-file}")
endforeach()<commit_msg>CMake: Copy test data by using add_custom_command<commit_after>cmake_minimum_required (VERSION 2.6)

set(test-files molch-init.backup molch-init-backup.key)

# copy all test files to the test binary dir
foreach(test-file ${test-files})
    add_custom_command(
        OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${test-file}"
        COMMAND ${CMAKE_COMMAND}
        ARGS -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/${test-file}" "${CMAKE_CURRENT_BINARY_DIR}/${test-file}"
        COMMENT "Copying ${test-file}"
        VERBATIM)
    list(APPEND test-data-sources "${CMAKE_CURRENT_BINARY_DIR}/${test-file}")
endforeach()

add_custom_target(test-data ALL SOURCES ${test-data-sources})
{'fraction_non_alphanumeric': 0.13140096618357489, 'fraction_numerical': 0.003864734299516908, 'mean_word_length': 5.278787878787878, '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': '2204348', 'n_tokens_mistral': 361, 'n_tokens_neox': 346, 'n_words': 68}