<commit_before>cmake_minimum_required(VERSION 3.0.2)
project("Lily" C)

if(MSVC)
    # MSBuild adds the configuration kind (Release/Debug/etc.) as a suffix
    # directory to libraries and executables. This causes the testing suite to
    # fail because the libraries aren't where it expects them to be.
    # GENERATOR_IS_MULTI_CONFIG might be usable here instead, but that requires
    # a much more recent version of cmake.
    if(NOT "${CMAKE_VS_MSBUILD_COMMAND}" STREQUAL "")
        message(FATAL_ERROR
                "Cannot build Lily using MSBuild (try -GNinja or another generator instead).")
    endif()

    add_definitions(/W4)
    add_definitions(/wd4201)
    add_definitions(/wd4204)
    add_definitions(/wd4214)
    add_definitions(/MP)
    set(CMAKE_CTEST_COMMAND	copy lily.exe ..)
else()
    set(CMAKE_CTEST_COMMAND	cp lily ..)
    if(DEBUG)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -g3")
    endif(DEBUG)

    if(NOT QUICK_BUILD)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -O2")
    endif(NOT QUICK_BUILD)

    set(CMAKE_C_FLAGS          "${CMAKE_C_FLAGS} -Wall -Wextra -Wimplicit-fallthrough=0 -Wsign-compare -Wshadow")

    if(WITH_COVERAGE)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -O0 -fprofile-arcs -ftest-coverage")<commit_msg>Change implicit fallthrough flag to work with older versions of gcc.<commit_after>cmake_minimum_required(VERSION 3.0.2)
project("Lily" C)

if(MSVC)
    # MSBuild adds the configuration kind (Release/Debug/etc.) as a suffix
    # directory to libraries and executables. This causes the testing suite to
    # fail because the libraries aren't where it expects them to be.
    # GENERATOR_IS_MULTI_CONFIG might be usable here instead, but that requires
    # a much more recent version of cmake.
    if(NOT "${CMAKE_VS_MSBUILD_COMMAND}" STREQUAL "")
        message(FATAL_ERROR
                "Cannot build Lily using MSBuild (try -GNinja or another generator instead).")
    endif()

    add_definitions(/W4)
    add_definitions(/wd4201)
    add_definitions(/wd4204)
    add_definitions(/wd4214)
    add_definitions(/MP)
    set(CMAKE_CTEST_COMMAND	copy lily.exe ..)
else()
    set(CMAKE_CTEST_COMMAND	cp lily ..)
    if(DEBUG)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -g3")
    endif(DEBUG)

    if(NOT QUICK_BUILD)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -O2")
    endif(NOT QUICK_BUILD)

    set(CMAKE_C_FLAGS          "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-implicit-fallthrough -Wsign-compare -Wshadow")

    if(WITH_COVERAGE)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -O0 -fprofile-arcs -ftest-coverage")
{'fraction_non_alphanumeric': 0.09708365310821182, 'fraction_numerical': 0.014965464313123561, 'mean_word_length': 3.211631663974152, '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': '5471948', 'n_tokens_mistral': 943, 'n_tokens_neox': 887, 'n_words': 221}