function(enable_doxygen)
  option(ENABLE_DOXYGEN "Enable doxygen doc builds of source" FALSE)
  if (ENABLE_DOXYGEN)
    set(DOXYGEN_CALLER_GRAPH TRUE)
    set(DOXYGEN_CALL_GRAPH TRUE)
    set(DOXYGEN_EXTRACT_ALL TRUE)
    find_package(Doxygen REQUIRED dot)
    doxygen_add_docs(doxygen-docs ${PROJECT_SOURCE_DIR})

  endif ()
endfunction()
