<commit_before>
# Attempt to find gengetopt. If not found, compile it.
FIND_PROGRAM(GENGETOPT gengetopt)
IF (GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
  ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmake/gengetopt)
ELSE(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
  ADD_EXECUTABLE(gengetopt IMPORTED)
  SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})
ENDIF(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")

MACRO (WRAP_GGO GGO_SRCS)
  FOREACH(GGO_FILE ${ARGN})
    GET_FILENAME_COMPONENT(GGO_BASEFILENAME ${GGO_FILE} NAME_WE)
    GET_FILENAME_COMPONENT(GGO_FILE_ABS ${GGO_FILE} ABSOLUTE)
    SET(GGO_H ${GGO_BASEFILENAME}_ggo.h)
    SET(GGO_C ${GGO_BASEFILENAME}_ggo.c)
    SET(GGO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${GGO_H} ${CMAKE_CURRENT_BINARY_DIR}/${GGO_C})
    ADD_CUSTOM_COMMAND(OUTPUT ${GGO_OUTPUT}
                       COMMAND gengetopt
                       ARGS < ${GGO_FILE_ABS}<commit_msg>Fixed issue when the package is called from another directory<commit_after>
# Attempt to find gengetopt. If not found, compile it.
FIND_PROGRAM(GENGETOPT gengetopt)
IF (GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
  ADD_SUBDIRECTORY(${CMAKE_CURRENT_LIST_DIR}/gengetopt ${CMAKE_CURRENT_BINARY_DIR}/gengetopt)
ELSE(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
  ADD_EXECUTABLE(gengetopt IMPORTED)
  SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})
ENDIF(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")

MACRO (WRAP_GGO GGO_SRCS)
  FOREACH(GGO_FILE ${ARGN})
    GET_FILENAME_COMPONENT(GGO_BASEFILENAME ${GGO_FILE} NAME_WE)
    GET_FILENAME_COMPONENT(GGO_FILE_ABS ${GGO_FILE} ABSOLUTE)
    SET(GGO_H ${GGO_BASEFILENAME}_ggo.h)
    SET(GGO_C ${GGO_BASEFILENAME}_ggo.c)
    SET(GGO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${GGO_H} ${CMAKE_CURRENT_BINARY_DIR}/${GGO_C})
    ADD_CUSTOM_COMMAND(OUTPUT ${GGO_OUTPUT}
                       COMMAND gengetopt
                       ARGS < ${GGO_FILE_ABS}
{'fraction_non_alphanumeric': 0.09716386554621849, 'fraction_numerical': 0.0, 'mean_word_length': 5.32890365448505, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2454815', 'n_tokens_mistral': 786, 'n_tokens_neox': 749, 'n_words': 117}