Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit b80652a

Browse files
goto40zalox
authored andcommitted
Add documentation generation using doxygen
1 parent 6cf4d69 commit b80652a

File tree

6 files changed

+60
-43
lines changed

6 files changed

+60
-43
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,7 @@ See [enhancements](https://github.com/cppit/jucipp/labels/enhancement) for plann
4949
* [tiny-process-library](http://github.com/eidheim/tiny-process-library/) (downloaded directly with git --recursive, no need to install)
5050

5151
## Installation
52-
See [installation guide](http://github.com/cppit/jucipp/blob/master/docs/install.md).
52+
See [installation guide](docs/install.md).
53+
54+
## Documentation
55+
See [how to build the API doc](docs/api.md).

docs/api.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# juCi++ API doc
2+
3+
## Prerequisites:
4+
* doxygen
5+
* plantuml
6+
* install via apt-get or download from http://plantuml.com/
7+
* see also http://plantuml.com/starting.html
8+
* if downloaded either copy the jar file to /usr/bin or set the environment variable PLANTUML_PATH to point to the path containing the jar file)
9+
10+
## How to build the API doc:
11+
```sh
12+
mkdir jucipp/build
13+
cd jucipp/build
14+
cmake ..
15+
make doc
16+
```
17+
18+
## Where is the generated API documentation
19+
Open jupicpp/build/src/html/index.html

src/CMakeLists.txt

+7-13
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,14 @@ install(TARGETS ${project_name}
142142
RUNTIME DESTINATION bin
143143
)
144144

145-
find_package(Plantuml)
146-
if(PLANTUML_FOUND)
147-
#message("plantuml found PLANTUML_JARFILE=${PLANTUML_JARFILE}")
148-
else(Plantuml_FOUND)
149-
message("plantuml not found. No UML diagrams are generated. You may define the environment variable PLANTUML_PATH...")
150-
endif(PLANTUML_FOUND)
151-
152145
# add a target to generate API documentation with Doxygen
146+
find_package(Plantuml)
153147
find_package(Doxygen)
154148
if(DOXYGEN_FOUND)
155-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
156-
add_custom_target(doc
157-
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
158-
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
159-
COMMENT "Generating API documentation with Doxygen to ${CMAKE_CURRENT_BINARY_DIR}" VERBATIM
160-
)
149+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
150+
add_custom_target(doc
151+
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
152+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
153+
COMMENT "Generating API documentation with Doxygen to ${CMAKE_CURRENT_BINARY_DIR}" VERBATIM
154+
)
161155
endif(DOXYGEN_FOUND)

src/Doxyfile.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ HIDE_UNDOC_RELATIONS = YES
21112111
# set to NO
21122112
# The default value is: NO.
21132113

2114-
HAVE_DOT = NO
2114+
HAVE_DOT = YES
21152115

21162116
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
21172117
# to run in parallel. When set to 0 doxygen will base this on the number of
@@ -2198,7 +2198,7 @@ UML_LIMIT_NUM_FIELDS = 10
21982198
# The default value is: NO.
21992199
# This tag requires that the tag HAVE_DOT is set to YES.
22002200

2201-
TEMPLATE_RELATIONS = NO
2201+
TEMPLATE_RELATIONS = YES
22022202

22032203
# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
22042204
# YES then doxygen will generate a graph for each documented file showing the
@@ -2240,7 +2240,7 @@ CALL_GRAPH = NO
22402240
# The default value is: NO.
22412241
# This tag requires that the tag HAVE_DOT is set to YES.
22422242

2243-
CALLER_GRAPH = NO
2243+
CALLER_GRAPH = YES
22442244

22452245
# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
22462246
# hierarchy of all classes instead of a textual one.

src/doc.h

-26
This file was deleted.

src/juci.h

+27
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
/**
2+
\mainpage
3+
juCi++ is a lightweight C++ IDE written in C++
4+
(<a href="https://github.com/cppit/jucipp">Github page</a>).
5+
6+
\section sec_overview Overview
7+
The application entry point is the class Application.
8+
9+
\section sec_dependencies Dependencies
10+
juCi++ is based on boost, gtkmm and libclang (among others).
11+
\startuml
12+
left to right direction
13+
component [juCi++] #LightGreen
14+
component [libclangmm] #Cyan
15+
component [tiny-process-library] #Cyan
16+
[juCi++] --> [boost-filesystem] : use
17+
[juCi++] --> [boost-regex] : use
18+
[juCi++] --> [gtkmm-3.0] : use
19+
[juCi++] --> [gtksourceviewmm-3.0] : use
20+
[juCi++] --> [aspell] : use
21+
[juCi++] --> [lbclang] : use
22+
[juCi++] --> [lbdb] : use
23+
[juCi++] --> [libclangmm] : use
24+
[juCi++] --> [tiny-process-library] : use
25+
\enduml
26+
*/
27+
128
#ifndef JUCI_JUCI_H_
229
#define JUCI_JUCI_H_
330

0 commit comments

Comments
 (0)