<commit_before>cmake_minimum_required(VERSION 3.0.0)
project(sela VERSION 0.1.0)

# Use C++11
set(CMAKE_CXX_STANDARD 11)
# Require (at least) it
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Don't use e.g. GNU extension (like -std=gnu++11) for portability
set(CMAKE_CXX_EXTENSIONS OFF)

# Enable Warnings for MSVC/GCC/Clang
if(MSVC)
    add_compile_options(/W4 /WX)
else()
    add_compile_options(-Wall -Wextra -pedantic -Werror)
endif()

# Enable CTest
include(CTest)
enable_testing()
add_test(NAME SelaTests COMMAND selatests)

# CPack config
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)

# Make sela executable
set(SOURCES 
    src/main.cpp
    src/lpc/linear_predictor.cpp
    src/rice/rice_encoder.cpp
    src/rice/rice_decoder.cpp
)
add_executable(sela ${SOURCES})

# Prepare "Catch" library for other executables
set(CATCH_INCLUDE_DIR test/include)
add_library(Catch INTERFACE)
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})

# Make test executable
set(TEST_SOURCES 
    src/rice/rice_encoder.cpp
    src/rice/rice_decoder.cpp
    test/ricetests.cpp
)
add_executable(selatests ${TEST_SOURCES})
target_link_libraries(selatests Catch)

option(CODE_COVERAGE "Enable coverage reporting" OFF)
if(CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
  # Add required flags (GCC & LLVM/Clang)
  target_compile_options(selatests INTERFACE
    -O0        # no optimization
    -g         # generate debug info
    --coverage # sets all required flags
  )
  if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
    target_link_options(selatests INTERFACE --coverage)
  else()
    target_link_libraries(selatests INTERFACE --coverage)
  endif()
endif(CODE_COVERAGE)<commit_msg>Warnings fixed<commit_after>cmake_minimum_required(VERSION 3.0.0)
project(sela VERSION 0.1.0)

# Use C++11
set(CMAKE_CXX_STANDARD 11)
# Require (at least) it
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Don't use e.g. GNU extension (like -std=gnu++11) for portability
set(CMAKE_CXX_EXTENSIONS OFF)

# Enable Warnings for MSVC/GCC/Clang
if(MSVC)
    add_compile_options(/W4 /WX)
else()
    add_compile_options(-Wall -Wextra -pedantic -Werror)
endif()

# Enable CTest
include(CTest)
enable_testing()
add_test(NAME SelaTests COMMAND selatests)

# CPack config
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)

# Make sela executable
set(SOURCES 
    src/main.cpp
    src/lpc/linear_predictor.cpp
    src/rice/rice_encoder.cpp
    src/rice/rice_decoder.cpp
)
add_executable(sela ${SOURCES})

# Prepare "Catch" library for other executables
set(CATCH_INCLUDE_DIR test/include)
add_library(Catch INTERFACE)
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})

# Make test executable
set(TEST_SOURCES 
    src/rice/rice_encoder.cpp
    src/rice/rice_decoder.cpp
    test/ricetests.cpp
)
add_executable(selatests ${TEST_SOURCES})
target_link_libraries(selatests Catch)

option(CODE_COVERAGE "Enable coverage reporting" OFF)
if(CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
    # Add required flags (GCC & LLVM/Clang)
    target_compile_options(selatests INTERFACE
        -O0        # no optimization
        -g         # generate debug info
        --coverage # sets all required flags
    )
    if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
        target_link_options(selatests INTERFACE --coverage)
    else()
        target_link_libraries(selatests INTERFACE --coverage)
    endif()
endif(CODE_COVERAGE)

{'fraction_non_alphanumeric': 0.09225512528473805, 'fraction_numerical': 0.00968109339407745, 'mean_word_length': 4.8452579034941765, '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': '2430317', 'n_tokens_mistral': 1359, 'n_tokens_neox': 1252, 'n_words': 258}