문제 설명
이미 존재하는 doxygen 문서를 상호 참조하는 방법은 무엇입니까? (How to cross‑reference already existing doxygen docs?)
두 개의 C++ 프로젝트 A와 B가 있습니다. 종속성은 B 대 A뿐입니다.
B ‑‑> A
A와 B에서 각각 Doxygen을 실행하고 싶지만 여전히 B 문서에서 A에 대한 가능한 상호 참조를 허용합니다. (즉, B 문서를 탐색할 때 B에서 사용된 A의 클래스가 있으면 A 문서에 직접 연결할 수 있습니다.)
‑‑
[답변 답변 from 0x4b:] "CREATE_SUBDIRS"를 YES로 설정하고 태그 파일에 상대 경로를 사용하면 Doxygen이 어떻게든 잘못된 링크 참조를 만들 것입니다.
예를 따랐습니다.
<root>
+‑ proj
| +‑ html HTML output directory for proj
| +‑ d1
| | +‑ d2
| | .... (*.html)
| |
| ...(*.html)
| +‑ src sources for proj
+‑ ext1
| +‑ html HTML output directory for ext1
| |‑ ext1.tag tag file for ext1
|‑ proj.cfg doxygen configuration file for proj
|‑ ext1.cfg doxygen configuration file for ext1
proj.cfg:
OUTPUT_DIRECTORY = proj
INPUT = proj/src
TAGFILES = ext1/ext1.tag=../../ext1/html
ext1.cfg:
OUTPUT_DIRECTORY = ext1
GENERATE_TAGFILE = ext1/ext1.tag
html/
및 html/d1/d2
아래의 문서는 ../../ext1/html에 있는 외부 문서를 연결하려고 합니다. </코드>. 분명히 그들 중 하나는 실패할 것입니다.
참조 솔루션
방법 1:
You probably want to use the tagfile feature. When you generate the documentation for A, make sure the GENERATE_TAGFILE option is set. When you generate the documentation for B, set the value of TAGFILES to include the result from A.
[Update to address relative paths]
Doxygen is fairly fragile when it comes to [relative] paths. You clearly understand that using an absolute path will solve the problem. You could try taking a value from the environment, e.g. using
TAGFILES = ext1/ext1.tag=$(PWD)/../ext1/html
to create an absolute path. It's not ideal, but a lot of the values in the Doxyfile depend on where doxygen is run, and not where the configuration file lives.
(by rnd_nr_gen、Kirk Kelsey)
참조 문서