<commit_before>if (MSVC)
    set(CPPUTEST_C_WARNING_FLAGS "/WX")
    set(CPPUTEST_CXX_WARNING_FLAGS "/WX /wd4290")
else (MSVC)
    include(CheckCCompilerFlag)
    include(CheckCXXCompilerFlag)

    set(WARNING_C_FLAGS
        Werror
        Weverything
        Wall
        Wextra
        Wshadow
        Wswitch-default
        Wswitch-enum
        Wconversion
        pedantic-errors
        Wsign-conversion
        Woverloaded-virtual
        Wno-padded
        )

    set(WARNING_C_ONLY_FLAGS
        Wstrict-prototypes
        )

    set(WARNING_CXX_FLAGS
        Wno-global-constructors
        Wno-exit-time-destructors
        Wno-weak-vtables
        )

    foreach (flag ${WARNING_C_FLAGS})
        check_c_compiler_flag("-${flag}" WARNING_FLAG_${flag})
        if (WARNING_FLAG_${flag})
            set(CPPUTEST_C_WARNING_FLAGS "${CPPUTEST_C_WARNING_FLAGS} -${flag}")
        endif (WARNING_FLAG_${flag})
    endforeach (flag ${WARNING_C_FLAGS})
    check_c_compiler_flag(-Wno-disabled-macro-expansion WARNING_FLAG_no_disabled_macro_expansion)
    if (WARNING_FLAG_no_disabled_macro_expansion)
        set(CPPUTEST_C_WARNING_FLAGS "${CPPUTEST_C_WARNING_FLAGS} -Wno-disabled-macro-expansion")
    endif (WARNING_FLAG_no_disabled_macro_expansion)

    set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} ${CPPUTEST_C_WARNING_FLAGS}")
    check_cxx_compiler_flag(-Wno-global-constructors WARNING_FLAG_no_global_constructors)
    if (WARNING_FLAG_no_global_constructors)
        set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -Wno-global-constructors")
    endif (WARNING_FLAG_no_global_constructors)

    check_cxx_compiler_flag(-Wno-exit-time-destructors WARNING_FLAG_no_exit_time_destructors)
    if (WARNING_FLAG_no_exit_time_destructors)<commit_msg>cmake: Disabled -Werror and -pedantic-errors if gmock or gtest integration is enabled.<commit_after>if (MSVC)
    set(CPPUTEST_C_WARNING_FLAGS "/WX")
    set(CPPUTEST_CXX_WARNING_FLAGS "/WX /wd4290")
else (MSVC)
    include(CheckCCompilerFlag)
    include(CheckCXXCompilerFlag)

    set(WARNING_C_FLAGS
        Weverything
        Wall
        Wextra
        Wshadow
        Wswitch-default
        Wswitch-enum
        Wconversion
        Wsign-conversion
        Woverloaded-virtual
        Wno-padded
        )

    if (NOT GMOCK AND NOT REAL_GTEST)
      list(APPEND WARNING_C_FLAGS Werror pedantic-errors)
    endif (NOT GMOCK AND NOT REAL_GTEST)

    set(WARNING_C_ONLY_FLAGS
        Wstrict-prototypes
        )

    set(WARNING_CXX_FLAGS
        Wno-global-constructors
        Wno-exit-time-destructors
        Wno-weak-vtables
        )

    foreach (flag ${WARNING_C_FLAGS})
        check_c_compiler_flag("-${flag}" WARNING_FLAG_${flag})
        if (WARNING_FLAG_${flag})
            set(CPPUTEST_C_WARNING_FLAGS "${CPPUTEST_C_WARNING_FLAGS} -${flag}")
        endif (WARNING_FLAG_${flag})
    endforeach (flag ${WARNING_C_FLAGS})
    check_c_compiler_flag(-Wno-disabled-macro-expansion WARNING_FLAG_no_disabled_macro_expansion)
    if (WARNING_FLAG_no_disabled_macro_expansion)
        set(CPPUTEST_C_WARNING_FLAGS "${CPPUTEST_C_WARNING_FLAGS} -Wno-disabled-macro-expansion")
    endif (WARNING_FLAG_no_disabled_macro_expansion)

    set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} ${CPPUTEST_C_WARNING_FLAGS}")
    check_cxx_compiler_flag(-Wno-global-constructors WARNING_FLAG_no_global_constructors)
    if (WARNING_FLAG_no_global_constructors)
        set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -Wno-global-constructors")
    endif (WARNING_FLAG_no_global_constructors)

    check_cxx_compiler_flag(-Wno-exit-time-destructors WARNING_FLAG_no_exit_time_destructors)
    if (WARNING_FLAG_no_exit_time_destructors)
{'fraction_non_alphanumeric': 0.0787506673785371, 'fraction_numerical': 0.002135611318739989, 'mean_word_length': 3.620221948212084, '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': '6600119', 'n_tokens_mistral': 1302, 'n_tokens_neox': 1242, 'n_words': 164}