Browse Source

Add documentation generation using doxygen

merge-requests/365/head
Goto40 10 years ago committed by Jørgen Lien Sellæg
parent
commit
b80652a930
  1. 5
      README.md
  2. 19
      docs/api.md
  3. 20
      src/CMakeLists.txt
  4. 6
      src/Doxyfile.in
  5. 26
      src/doc.h
  6. 27
      src/juci.h

5
README.md

@ -49,4 +49,7 @@ See [enhancements](https://github.com/cppit/jucipp/labels/enhancement) for plann
* [tiny-process-library](http://github.com/eidheim/tiny-process-library/) (downloaded directly with git --recursive, no need to install) * [tiny-process-library](http://github.com/eidheim/tiny-process-library/) (downloaded directly with git --recursive, no need to install)
## Installation ## Installation
See [installation guide](http://github.com/cppit/jucipp/blob/master/docs/install.md). See [installation guide](docs/install.md).
## Documentation
See [how to build the API doc](docs/api.md).

19
docs/api.md

@ -0,0 +1,19 @@
# juCi++ API doc
## Prerequisites:
* doxygen
* plantuml
* install via apt-get or download from http://plantuml.com/
* see also http://plantuml.com/starting.html
* 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)
## How to build the API doc:
```sh
mkdir jucipp/build
cd jucipp/build
cmake ..
make doc
```
## Where is the generated API documentation
Open jupicpp/build/src/html/index.html

20
src/CMakeLists.txt

@ -142,20 +142,14 @@ install(TARGETS ${project_name}
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
) )
find_package(Plantuml)
if(PLANTUML_FOUND)
#message("plantuml found PLANTUML_JARFILE=${PLANTUML_JARFILE}")
else(Plantuml_FOUND)
message("plantuml not found. No UML diagrams are generated. You may define the environment variable PLANTUML_PATH...")
endif(PLANTUML_FOUND)
# add a target to generate API documentation with Doxygen # add a target to generate API documentation with Doxygen
find_package(Plantuml)
find_package(Doxygen) find_package(Doxygen)
if(DOXYGEN_FOUND) if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen to ${CMAKE_CURRENT_BINARY_DIR}" VERBATIM COMMENT "Generating API documentation with Doxygen to ${CMAKE_CURRENT_BINARY_DIR}" VERBATIM
) )
endif(DOXYGEN_FOUND) endif(DOXYGEN_FOUND)

6
src/Doxyfile.in

@ -2111,7 +2111,7 @@ HIDE_UNDOC_RELATIONS = YES
# set to NO # set to NO
# The default value is: NO. # The default value is: NO.
HAVE_DOT = NO HAVE_DOT = YES
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
# to run in parallel. When set to 0 doxygen will base this on the number of # 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
# The default value is: NO. # The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
TEMPLATE_RELATIONS = NO TEMPLATE_RELATIONS = YES
# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to # If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
# YES then doxygen will generate a graph for each documented file showing the # YES then doxygen will generate a graph for each documented file showing the
@ -2240,7 +2240,7 @@ CALL_GRAPH = NO
# The default value is: NO. # The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
CALLER_GRAPH = NO CALLER_GRAPH = YES
# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical # If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
# hierarchy of all classes instead of a textual one. # hierarchy of all classes instead of a textual one.

26
src/doc.h

@ -1,26 +0,0 @@
/**
\mainpage
juCi++ is a lightweight C++ IDE written in C++
(<a href="https://github.com/cppit/jucipp">Github page</a>).
\section sec_overview Overview
The application entry point is the class Application.
\section sec_dependencies Dependencies
juCi++ is based on boost, gtkmm and libclang (among others).
\startuml
left to right direction
component [juCi++] #LightGreen
component [libclangmm] #Cyan
component [tiny-process-library] #Cyan
[juCi++] --> [boost-filesystem] : use
[juCi++] --> [boost-regex] : use
[juCi++] --> [gtkmm-3.0] : use
[juCi++] --> [gtksourceviewmm-3.0] : use
[juCi++] --> [aspell] : use
[juCi++] --> [lbclang] : use
[juCi++] --> [lbdb] : use
[juCi++] --> [libclangmm] : use
[juCi++] --> [tiny-process-library] : use
\enduml
*/

27
src/juci.h

@ -1,3 +1,30 @@
/**
\mainpage
juCi++ is a lightweight C++ IDE written in C++
(<a href="https://github.com/cppit/jucipp">Github page</a>).
\section sec_overview Overview
The application entry point is the class Application.
\section sec_dependencies Dependencies
juCi++ is based on boost, gtkmm and libclang (among others).
\startuml
left to right direction
component [juCi++] #LightGreen
component [libclangmm] #Cyan
component [tiny-process-library] #Cyan
[juCi++] --> [boost-filesystem] : use
[juCi++] --> [boost-regex] : use
[juCi++] --> [gtkmm-3.0] : use
[juCi++] --> [gtksourceviewmm-3.0] : use
[juCi++] --> [aspell] : use
[juCi++] --> [lbclang] : use
[juCi++] --> [lbdb] : use
[juCi++] --> [libclangmm] : use
[juCi++] --> [tiny-process-library] : use
\enduml
*/
#ifndef JUCI_JUCI_H_ #ifndef JUCI_JUCI_H_
#define JUCI_JUCI_H_ #define JUCI_JUCI_H_

Loading…
Cancel
Save