function(enable_doxygen)
  find_package(Doxygen)
  if(Doxygen_FOUND)
    option(ENABLE_DOXYGEN "Enable doxygen doc builds of source" ON)
    if(ENABLE_DOXYGEN)
      set(DOXYGEN_CALLER_GRAPH YES)
      set(DOXYGEN_CALL_GRAPH YES)
      set(DOXYGEN_EXTRACT_ALL YES)
      set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
      find_package(Doxygen REQUIRED dot)
    endif()
  endif()
endfunction()
