<commit_before>
find_program(INKSCAPE NAMES inkscape)
find_package(Doxygen)

add_custom_target(docs ALL)

if (INKSCAPE)
    add_custom_command(OUTPUT overview.pdf
        COMMAND ${INKSCAPE} --export-pdf=overview.pdf ${CMAKE_CURRENT_SOURCE_DIR}/overview.svg
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/overview.svg)

    add_custom_command(OUTPUT secondary-ecus.pdf
        COMMAND ${INKSCAPE} --export-pdf=secondary-ecus.pdf ${CMAKE_CURRENT_SOURCE_DIR}/secondary-ecus.svg
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/secondary-ecus.svg)

    add_custom_target(docs-inkscape DEPENDS overview.pdf secondary-ecus.pdf)
    add_dependencies(docs docs-inkscape)
endif(INKSCAPE)

if (DOXYGEN_FOUND)
    configure_file(Doxyfile.in Doxyfile @ONLY)
    add_custom_target(doxygen
        COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
        COMMENT "Generating Doxygen Documentation")
    add_dependencies(docs doxygen)
    install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION share/doc/aktualizr)
else(DOXYGEN_FOUND)
    message(WARNING "doxygen not found, skipping")
endif(DOXYGEN_FOUND)<commit_msg>Only build Doxygen docs if dot and Doxygen are present<commit_after>
find_program(INKSCAPE NAMES inkscape)
find_package(Doxygen)

add_custom_target(docs ALL)

if (INKSCAPE)
    add_custom_command(OUTPUT overview.pdf
        COMMAND ${INKSCAPE} --export-pdf=overview.pdf ${CMAKE_CURRENT_SOURCE_DIR}/overview.svg
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/overview.svg)

    add_custom_command(OUTPUT secondary-ecus.pdf
        COMMAND ${INKSCAPE} --export-pdf=secondary-ecus.pdf ${CMAKE_CURRENT_SOURCE_DIR}/secondary-ecus.svg
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/secondary-ecus.svg)

    add_custom_target(docs-inkscape DEPENDS overview.pdf secondary-ecus.pdf)
    add_dependencies(docs docs-inkscape)
endif(INKSCAPE)

if (DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
    configure_file(Doxyfile.in Doxyfile @ONLY)
    add_custom_target(doxygen
        COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
        COMMENT "Generating Doxygen Documentation")
    add_dependencies(docs doxygen)
    install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION share/doc/aktualizr)
else(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
    message(WARNING "doxygen + dot not found, skipping")
endif(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
{'fraction_non_alphanumeric': 0.08814589665653495, 'fraction_numerical': 0.0, 'mean_word_length': 5.160427807486631, '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': '2314274', 'n_tokens_mistral': 832, 'n_tokens_neox': 786, 'n_words': 131}