<commit_before>#
# Copyright (c) 2016 <NAME> (<EMAIL>)
#
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
# or copy at http://opensource.org/licenses/MIT)
#

INCLUDE_DIRECTORIES(
    ${PKSAV_SOURCE_DIR}/include
    ${PKSAV_BINARY_DIR}/include
)

MACRO(PKSAV_BUILD_APP app_name)
    SET_SOURCE_FILES_PROPERTIES(${app_name}.c
        PROPERTIES COMPILE_FLAGS "${PKSAV_C_FLAGS}"
    )
    ADD_EXECUTABLE(${app_name} ${app_name}.c)
    TARGET_LINK_LIBRARIES(${app_name} pksav)
    INSTALL(
        TARGETS ${app_name}
        DESTINATION ${RUNTIME_DIR}
        COMPONENT Applications
    )
ENDMACRO(PKSAV_BUILD_APP)

SET(pksav_apps
    pksav-gen1-save-dump
    pksav-gba-save-dump
)

FOREACH(app ${pksav_apps})
    PKSAV_BUILD_APP(${app})
ENDFOREACH(app ${pksav_apps})
<commit_msg>cmake: conditionally build apps based on library support<commit_after>#
# Copyright (c) 2016 <NAME> (<EMAIL>)
#
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
# or copy at http://opensource.org/licenses/MIT)
#

INCLUDE_DIRECTORIES(
    ${PKSAV_SOURCE_DIR}/include
    ${PKSAV_BINARY_DIR}/include
)

MACRO(PKSAV_BUILD_APP app_name)
    SET_SOURCE_FILES_PROPERTIES(${app_name}.c
        PROPERTIES COMPILE_FLAGS "${PKSAV_C_FLAGS}"
    )
    ADD_EXECUTABLE(${app_name} ${app_name}.c)
    TARGET_LINK_LIBRARIES(${app_name} pksav)
    INSTALL(
        TARGETS ${app_name}
        DESTINATION ${RUNTIME_DIR}
        COMPONENT Applications
    )
ENDMACRO(PKSAV_BUILD_APP)

IF(PKSAV_ENABLE_GEN1)
    LIST(APPEND pksav_apps pksav-gen1-save-dump)
ENDIF(PKSAV_ENABLE_GEN1)
IF(PKSAV_ENABLE_GBA)
    LIST(APPEND pksav_apps pksav-gba-save-dump)
ENDIF(PKSAV_ENABLE_GBA)

FOREACH(app ${pksav_apps})
    PKSAV_BUILD_APP(${app})
ENDFOREACH(app ${pksav_apps})

{'fraction_non_alphanumeric': 0.11655405405405406, 'fraction_numerical': 0.006756756756756757, 'mean_word_length': 4.5186335403726705, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2597821', 'n_tokens_mistral': 727, 'n_tokens_neox': 694, 'n_words': 112}