1
0
Fork 0
forked from fun/fun

Added basic Doxygen.in file to create code documentation in the future. No code changes. (0.41.5)

This commit is contained in:
Johannes Findeisen 2026-04-28 06:11:21 +02:00
commit d452c9c6bc
3 changed files with 99 additions and 1 deletions

View file

@ -425,6 +425,50 @@ if(BUILD_TESTING)
endif()
endif()
# --- Doxygen docs target ---
# Generate API documentation for everything under src/ into <build>/docs/html
find_package(Doxygen REQUIRED dot)
# Provide a boolean for HAVE_DOT in the Doxyfile
set(HAVE_DOT NO)
if (DOXYGEN_DOT_FOUND)
set(HAVE_DOT YES)
endif()
# Determine documentation version: prefer `git describe`, fallback to project version
set(FUN_DOCS_VERSION "${PROJECT_VERSION}")
find_package(Git QUIET)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --tags --dirty --always
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE _git_desc
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
if(_git_desc)
set(FUN_DOCS_VERSION "${_git_desc}")
endif()
endif()
# Optional logo (if present in the website assets)
set(FUN_DOCS_LOGO "")
set(_fun_logo_path "${CMAKE_SOURCE_DIR}/web/images/fun-square.png")
if(EXISTS "${_fun_logo_path}")
set(FUN_DOCS_LOGO "${_fun_logo_path}")
endif()
set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/Doxygen.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
# Create a target to run Doxygen with the configured file
add_custom_target(fun_docs
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM)
# Install rules
# Binary
install(TARGETS fun

53
Doxygen.in Normal file
View file

@ -0,0 +1,53 @@
## Doxygen configuration for the "fun" project (processed by CMake)
# This file is configured by CMake's configure_file(@ONLY).
# --- Project ---
PROJECT_NAME = "Fun"
PROJECT_NUMBER = "@FUN_DOCS_VERSION@"
# Optional project logo (relative or absolute path). Leave empty if not found.
PROJECT_LOGO = "@FUN_DOCS_LOGO@"
# --- Output ---
OUTPUT_DIRECTORY = "@CMAKE_CURRENT_BINARY_DIR@/docs"
CREATE_SUBDIRS = NO
GENERATE_HTML = YES
HTML_OUTPUT = html
GENERATE_LATEX = NO
# --- Input ---
INPUT = "@CMAKE_SOURCE_DIR@/src"
RECURSIVE = YES
FILE_PATTERNS = *.h *.hpp *.c *.cc *.cpp
# --- Extraction policy ---
# Default to public/protected only to reduce noise; flip to YES if you want internals.
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_METHODS = YES
OPTIMIZE_OUTPUT_FOR_C = YES
# --- Paths shown in docs ---
FULL_PATH_NAMES = NO
STRIP_FROM_PATH = "@CMAKE_SOURCE_DIR@"
# --- Source browsing ---
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
GENERATE_TREEVIEW = YES
# --- Diagrams (Graphviz) ---
HAVE_DOT = @HAVE_DOT@
CLASS_DIAGRAMS = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
DOT_IMAGE_FORMAT = svg
# --- Warnings / noise ---
QUIET = YES
WARN_IF_UNDOCUMENTED = NO
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO

View file

@ -8,6 +8,7 @@ noToc: false
title: Call for Participants and Sponsors
description: Join us in shaping the future of the Fun programming language
date: 2026-04-23
date_updated: 2026-04-27
categories:
- news
- project
@ -46,7 +47,7 @@ If you or your organization are interested in supporting Fun, please reach out t
If you're interested in participating or sponsoring, please:
- Visit our [Git Repository](https://git.xw3.org/fun/fun){:class="git"} and check out the open issues.
- Join our community discussions.
- Join our [community discussions](https://fun-lang.xyz/community/).
- Contact Johannes Findeisen (hanez) directly via [email](mailto:hanez@fun-lang.xyz){:class="mail"}.
Every contribution, no matter how small, helps us move closer to our goal of making Fun a powerful and minimal tool for developers everywhere.