<commit_before>#
# Copyright (c) 2014-2019 CNRS
# Copyright (c) 2018-2020 INRIA
#

MACRO(ADD_LIB_UNIT_TEST test)
  CREATE_CTEST_BUILD_TESTS_TARGET()

  IF(BUILD_TESTING)
    ADD_LIBRARY(${test} SHARED ${test})
  ELSE(BUILD_TESTING)
    ADD_LIBRARY(${test} SHARED EXCLUDE_FROM_ALL ${test})
  ENDIF(BUILD_TESTING)

  TARGET_LINK_LIBRARIES(${test} PUBLIC ${PROJECT_NAME})
  SET_TARGET_PROPERTIES(${test} PROPERTIES PREFIX "")

  SET_TARGET_PROPERTIES(${test} PROPERTIES SUFFIX ${PYTHON_EXT_SUFFIX})

  ADD_TEST(NAME ${test} COMMAND ${PYTHON_EXECUTABLE} -c "import ${test}")

  ADD_DEPENDENCIES(build_tests ${test})
  IF(NOT BUILD_TESTING)
    SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS ctest_build_tests)<commit_msg>[CMake] add extension to fix CMP0115<commit_after>#
# Copyright (c) 2014-2019 CNRS
# Copyright (c) 2018-2020 INRIA
#

MACRO(ADD_LIB_UNIT_TEST test)
  CREATE_CTEST_BUILD_TESTS_TARGET()

  IF(BUILD_TESTING)
    ADD_LIBRARY(${test} SHARED "${test}.cpp")
  ELSE(BUILD_TESTING)
    ADD_LIBRARY(${test} SHARED EXCLUDE_FROM_ALL "${test}.cpp")
  ENDIF(BUILD_TESTING)

  TARGET_LINK_LIBRARIES(${test} PUBLIC ${PROJECT_NAME})
  SET_TARGET_PROPERTIES(${test} PROPERTIES PREFIX "")

  SET_TARGET_PROPERTIES(${test} PROPERTIES SUFFIX ${PYTHON_EXT_SUFFIX})

  ADD_TEST(NAME ${test} COMMAND ${PYTHON_EXECUTABLE} -c "import ${test}")

  ADD_DEPENDENCIES(build_tests ${test})
  IF(NOT BUILD_TESTING)
    SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS ctest_build_tests)
{'fraction_non_alphanumeric': 0.12508497620666215, 'fraction_numerical': 0.024473147518694765, 'mean_word_length': 6.747368421052632, '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': '778043', 'n_tokens_mistral': 642, 'n_tokens_neox': 574, 'n_words': 98}