<commit_before>
FIND_PACKAGE (Boost 1.50 COMPONENTS system filesystem unit_test_framework QUIET)
IF(DEFINED Boost_FOUND)

  link_directories(${Boost_LIBRARY_DIR})
  MESSAGE("++ Boost libraries found  : ${Boost_LIBRARIES}")

else()
  MESSAGE("++ Boost not found ++ skipping tests!")
endif()


cmake_host_system_information(RESULT CURRENT_HOSTNAME QUERY HOSTNAME)

if(${CURRENT_HOSTNAME} MATCHES ".*(falcon2|schorle|scicomp-pc-3|recovery-station).*")
  add_executable(test_compass_impl test_compass_impl.cpp)
  target_link_libraries(test_compass_impl ${Boost_LIBRARIES})
  target_include_directories(test_compass_impl PRIVATE ${PROJECT_SOURCE_DIR}/include ${Boost_INCLUDE_DIR})
endif()

add_executable(test_bitview test_bitview.cpp)
target_link_libraries(test_bitview ${Boost_LIBRARIES})
target_include_directories(test_bitview PRIVATE ${PROJECT_SOURCE_DIR}/include ${Boost_INCLUDE_DIR})<commit_msg>added catch to project through ExternalProject API<commit_after>include(ExternalProject)

ExternalProject_Add(
    catch2
    PREFIX ${CMAKE_BINARY_DIR}/tests/
    URL https://raw.githubusercontent.com/catchorg/Catch2/v2.0.1/single_include/catch.hpp
    URL_MD5 9b3d2cb5c0f9532cddfbbfd0a622f0af
    DOWNLOAD_NO_EXTRACT TRUE
    TIMEOUT 10
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    )
ExternalProject_Get_Property(catch2 DOWNLOAD_DIR)
set(CATCH2_HEADER_PATH ${DOWNLOAD_DIR})

message("catch2 header file download to ${CATCH2_HEADER_PATH}")

FIND_PACKAGE (Boost 1.50 COMPONENTS system filesystem unit_test_framework QUIET)
IF(DEFINED Boost_FOUND)

  link_directories(${Boost_LIBRARY_DIR})
  MESSAGE("++ Boost libraries found  : ${Boost_LIBRARIES}")

else()
  MESSAGE("++ Boost not found ++ skipping tests!")
endif()


cmake_host_system_information(RESULT CURRENT_HOSTNAME QUERY HOSTNAME)

add_library(catcho OBJECT catch.cpp)
target_include_directories(catcho PRIVATE ${CATCH2_HEADER_PATH})
add_dependencies(catcho catch2)

if(${CURRENT_HOSTNAME} MATCHES ".*(falcon2|schorle|scicomp-pc-3|recovery-station).*")
  add_executable(test_compass_impl test_compass_impl.cpp)
  target_link_libraries(test_compass_impl ${Boost_LIBRARIES})
  target_include_directories(test_compass_impl PRIVATE ${PROJECT_SOURCE_DIR}/include ${Boost_INCLUDE_DIR})
endif()

add_executable(test_bitview test_bitview.cpp $<TARGET_OBJECTS:catcho>)
#target_link_libraries(test_bitview ${Boost_LIBRARIES})
target_include_directories(test_bitview PRIVATE ${PROJECT_SOURCE_DIR}/include ${CATCH2_HEADER_PATH})
{'fraction_non_alphanumeric': 0.09727782225780625, 'fraction_numerical': 0.015612489991993595, 'mean_word_length': 8.538167938931299, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3787051', 'n_tokens_mistral': 936, 'n_tokens_neox': 862, 'n_words': 137}