I want to show references to a file in doxygen documentation.
SETUP
I have three files in a directory: main.c
, req.yml
and dox.cfg
main.c
content:
#include <stdio.h>
/**
* @brief This function purpose is described in @ref req.yml
*/
void foo(int i)
{
printf("foo: %d", i);
}
/**
* @brief This function purpose is also described in @ref req.yml
*/
void bar(int i)
{
printf("bar: %d", i);
}
int main(int argc, char **argv)
{
foo(1);
bar(2);
return 0;
}
req.yml
:
##
# @file
#
# This is a requirement file
#
# @showrefs
#
name: req1
text: This requirement purpose
dox.cfg
:
PROJECT_NAME = "test
FILE_PATTERNS = *.h
*.yml
*.c
EXTRACT_ALL = YES
GENERATE_LATEX = NO
GENERATE_XML = NO
EXTENSION_MAPPING = yml=Python # interpret yml->python to make hashtag work
REFERENCES_LINK_SOURCE = YES
REFERENCED_BY_RELATION = YES
EFFECT
Both foo()
and bar()
have sections Referenced by main.c, but the requirement documentation file does not have such section.
GOAL
I would like to list (preferably in Referenced by section) that foo()
and bar()
reference that file, or any other way to visibly connect them without any proxy (pregenerated) file which would store that information.
I am using Doxygen 1.9.1
Yet, nothing works, the documentation page related to the yaml file does not show which elements reference it. Please help.
6