<commit_before>cmake_minimum_required(VERSION 2.8)
project(exercism CXX)

set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.55 REQUIRED COMPONENTS unit_test_framework date_time)
message("Boost includes:  " ${Boost_INCLUDE_DIRS})
message("Boost libraries: " ${Boost_LIBRARIES})

function(exercism exe)
    string(REPLACE "-" "_" file ${exe})
    if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.cpp)
        set(exercise_cpp ${file}.cpp)
    else()
        set(exercise_cpp "")
    endif()
    add_executable(${exe} ${file}_test.cpp ${exercise_cpp} ${file}.h)
    target_include_directories(${exe} PRIVATE ${Boost_INCLUDE_DIRS})
    target_link_libraries(${exe} ${Boost_LIBRARIES})
    add_custom_command(TARGET ${exe} POST_BUILD COMMAND ${exe})
endfunction()

foreach(exercise
    bob
    word-count
    hamming
    anagram
    food-chain
    beer-song<commit_msg>Travis: Handle exercise.{h,cpp} vs. bob.{h,cpp}<commit_after>cmake_minimum_required(VERSION 2.8)
project(exercism CXX)

set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.55 REQUIRED COMPONENTS unit_test_framework date_time)

function(exercism exe)
    string(REPLACE "-" "_" file ${exe})
    if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.h)
        set(exercise_test_cpp ${file}_test.cpp)
        set(exercise_cpp example.cpp)
        set(exercise_h example.h)
    elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.cpp)
        set(exercise_cpp ${file}.cpp)
    else()
        set(exercise_cpp "")
    endif()
    add_executable(${exe} ${exercise_test_cpp} ${exercise_cpp} ${exercise_h})
    target_include_directories(${exe} PRIVATE ${Boost_INCLUDE_DIRS})
    target_link_libraries(${exe} ${Boost_LIBRARIES})
    add_custom_command(TARGET ${exe} POST_BUILD COMMAND ${exe})
endfunction()

foreach(exercise
    bob
    word-count
    hamming
    anagram
    food-chain
    beer-song
{'fraction_non_alphanumeric': 0.12323232323232323, 'fraction_numerical': 0.005050505050505051, 'mean_word_length': 4.948948948948949, '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': '3546187', 'n_tokens_mistral': 775, 'n_tokens_neox': 705, 'n_words': 118}