<commit_before>macro ( sanitize_property_dirs target property )
        set(_cleandirs)
        get_target_property(_dirs ${target} ${property})
        if(_dirs)
            foreach(_d IN LISTS _dirs)
                if(EXISTS ${_d})
                    list(APPEND _cleandirs ${_d})
                else()
                    message(DEBUG "removing spurious directory ${_d} from property ${property} of target ${target}")
                endif()
            endforeach()
            set_property(TARGET ${target} PROPERTY ${property} ${_cleandirs})
        endif()
endmacro ( sanitize_property_dirs )

macro ( sanitize_target_dirs target )
    if (TARGET ${target})
        message(DEBUG "performing sanitize_target_dirs(${target})")
        sanitize_property_dirs( ${target} INTERFACE_INCLUDE_DIRECTORIES )
        sanitize_property_dirs( ${target} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES )
        sanitize_property_dirs( ${target} INTERFACE_LINK_DIRECTORIES )
    endif()
endmacro ( sanitize_target_dirs )

macro ( generate_pkgconfig_spec template outfile target )
    #message(DEBUG "generate_pkgconfig_spec: ${outfile} from template: ${template}")
    if (TARGET ${target})
        # retrieve all the private libs we depend on
        get_target_property (_libs ${target} INTERFACE_LINK_LIBRARIES)
        set(_cleanlibs)
        foreach(_lib IN LISTS _libs)
            if (TARGET ${_lib})
                get_target_property(_tlibs ${_lib} INTERFACE_LINK_LIBRARIES)
                foreach(_clib IN LISTS _tlibs)
                    get_filename_component(_name "${_clib}" NAME)
                    string(REGEX REPLACE "^lib" "" _clib ${_name})
                    string(REGEX REPLACE ".so$" "" _clib ${_clib})
                    list(APPEND _cleanlibs ${_clib})
                endforeach()
            else()
                list(APPEND _cleanlibs ${_lib})
            endif()
        endforeach()
        list(REMOVE_DUPLICATES _cleanlibs)
        set (LIBS_PRIVATE ${_cleanlibs})
        # make a copy
        set ( LIBS_PRIVATE_WITH_PATH ${LIBS_PRIVATE} )

        # this matches any path and any flag entries (starting with '-')<commit_msg>Fix PC_REQUIRES_PRIV related overlinking in fluidsynth.pc<commit_after>macro ( sanitize_property_dirs target property )
        set(_cleandirs)
        get_target_property(_dirs ${target} ${property})
        if(_dirs)
            foreach(_d IN LISTS _dirs)
                if(EXISTS ${_d})
                    list(APPEND _cleandirs ${_d})
                else()
                    message(DEBUG "removing spurious directory ${_d} from property ${property} of target ${target}")
                endif()
            endforeach()
            set_property(TARGET ${target} PROPERTY ${property} ${_cleandirs})
        endif()
endmacro ( sanitize_property_dirs )

macro ( sanitize_target_dirs target )
    if (TARGET ${target})
        message(DEBUG "performing sanitize_target_dirs(${target})")
        sanitize_property_dirs( ${target} INTERFACE_INCLUDE_DIRECTORIES )
        sanitize_property_dirs( ${target} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES )
        sanitize_property_dirs( ${target} INTERFACE_LINK_DIRECTORIES )
    endif()
endmacro ( sanitize_target_dirs )

macro ( generate_pkgconfig_spec template outfile target )
    #message(DEBUG "generate_pkgconfig_spec: ${outfile} from template: ${template}")
    if (TARGET ${target})
        # retrieve all the private libs we depend on
        get_target_property (_libs ${target} INTERFACE_LINK_LIBRARIES)
        set(_cleanlibs)
        foreach(_lib IN LISTS _libs)
            if (TARGET ${_lib})
                # All the imported PkgConfig target are explicitly added to PC_REQUIRES_PRIV.
                # Do not duplicate them into the Libs.private section, as they will be already part of Requires.private
            else()
                list(APPEND _cleanlibs ${_lib})
            endif()
        endforeach()
        list(REMOVE_DUPLICATES _cleanlibs)
        set (LIBS_PRIVATE ${_cleanlibs})
        # make a copy
        set ( LIBS_PRIVATE_WITH_PATH ${LIBS_PRIVATE} )

        # this matches any path and any flag entries (starting with '-')
{'fraction_non_alphanumeric': 0.09005763688760807, 'fraction_numerical': 0.0, 'mean_word_length': 2.5147679324894514, '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': '7569247', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1173, 'n_words': 299}