<commit_before>include(CheckCXXCompilerFlag)

function(add_compile_options_if_supported)
    foreach(flag ${ARGN})
        set(option_var option_supported_${flag})
        check_cxx_compiler_flag(${flag} ${option_var})

        if( ${option_var} )
            add_compile_options(${flag})
        endif()
    endforeach()
endfunction()

macro(add_c_flag)
    foreach(flag ${ARGN})
        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
    endforeach()
endmacro()

macro(add_cxx_flag)
    foreach(flag ${ARGN})
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
    endforeach()
endmacro()

macro(add_compiler_flag)
    foreach(flag ${ARGN})
        add_c_flag(${flag})
        add_cxx_flag(${flag})
    endforeach()
endmacro()

macro(add_linker_flag)
    foreach(flag ${ARGN})
        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag}")
    endforeach()
endmacro()
<commit_msg>CMake macro add_compiler_flag() deprecated by add_common_flags().<commit_after>include(CheckCXXCompilerFlag)

function(add_compile_options_if_supported)
    foreach(flag ${ARGN})
        set(option_var option_supported_${flag})
        check_cxx_compiler_flag(${flag} ${option_var})

        if( ${option_var} )
            add_compile_options(${flag})
        endif()
    endforeach()
endfunction()

macro(add_c_flag)
    foreach(flag ${ARGN})
        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
    endforeach()
endmacro()

macro(add_cxx_flag)
    foreach(flag ${ARGN})
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
    endforeach()
endmacro()

# @deprecated - use add_common_flags() instead
macro(add_compiler_flag)
    message(DEPRECATION "add_compiler_flag() is deprecated, use add_common_flags() instead")
    add_common_flags(${ARGN})
endmacro()

macro(add_common_flags)
    foreach(flag ${ARGN})
        add_c_flag(${flag})
        add_cxx_flag(${flag})
    endforeach()
endmacro()

macro(add_linker_flag)
    foreach(flag ${ARGN})
        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag}")
    endforeach()
endmacro()

{'fraction_non_alphanumeric': 0.13560975609756099, 'fraction_numerical': 0.0, 'mean_word_length': 4.327272727272727, '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': '1263450', 'n_tokens_mistral': 753, 'n_tokens_neox': 717, 'n_words': 109}