function(pp_configure_project_warnings target)
    if(MSVC)
        target_compile_options(${target} INTERFACE
            /W4
            /permissive-
            /Zc:__cplusplus
            /Zc:preprocessor
            # DEBT-0019: remove once legacy callback/interface parameters are either named intentionally or consumed.
            /wd4100)
        if(PP_ENABLE_MSVC_ANALYZE)
            target_compile_options(${target} INTERFACE /analyze)
        endif()
    else()
        target_compile_options(${target} INTERFACE
            -Wall
            -Wextra
            -Wpedantic
            -Wconversion
            -Wshadow
            -Wnull-dereference
            # DEBT-0019: remove once legacy callback/interface parameters are either named intentionally or consumed.
            -Wno-unused-parameter)
    endif()

    if(PP_ENABLE_ASAN)
        if(MSVC)
            target_compile_options(${target} INTERFACE /fsanitize=address)
            target_link_options(${target} INTERFACE /fsanitize=address)
        else()
            target_compile_options(${target} INTERFACE -fsanitize=address)
            target_link_options(${target} INTERFACE -fsanitize=address)
        endif()
    endif()

    if(PP_ENABLE_UBSAN AND NOT MSVC)
        target_compile_options(${target} INTERFACE -fsanitize=undefined)
        target_link_options(${target} INTERFACE -fsanitize=undefined)
    endif()

    if(PP_ENABLE_TSAN AND NOT MSVC)
        target_compile_options(${target} INTERFACE -fsanitize=thread)
        target_link_options(${target} INTERFACE -fsanitize=thread)
    endif()
endfunction()
