Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustment of Doxygen documentation (enable) #536

Open
wants to merge 7 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ endforeach()
#------------------------------------------------------------------------------
# DOXYGEN.
#------------------------------------------------------------------------------
Option(DOXYGEN_GENERATE_DOCUMENTATION "Build documentation for TUM OpenInfraPlatform." ON)
Option(DOXYGEN_GENERATE_DOCUMENTATION "Build documentation for TUM OpenInfraPlatform." OFF)

if(DOXYGEN_GENERATE_DOCUMENTATION)

Expand Down
16 changes: 10 additions & 6 deletions Documentation/markdown/DoxygenHelp.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,27 @@ Refer to the [doxygen manual](http://www.doxygen.nl/manual) for everything else.

## Doxygen settings in CMake

By default, doxygen is disabled.
To enable doxygen, search for the `DOXYGEN_GENERATE_DOCUMENTATION` option in CMake and set the check box.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're revisiting this in this PR, I'd propose to prepend the variable with OIP_ so that it is grouped together with other OIP's variables. Please change accordingly everywhere, where it comes up (I assume there are mentions in the Doxygen documentation as well).

After *Generate* in CMake, the Visual Studio Solution Explorer includes the project "OpenInfraPlatform.GenerateDocumentation".

### Top-level CMakelists.txt

If `DOXYGEN_GENERATE_DOCUMENTATION` is checked in the CMake GUI (default = ON), CMake will try to find the doxygen and dot executables in `C/thirdparty`. Additionally, a command that builds the documentation will be added to the solution.
If `DOXYGEN_GENERATE_DOCUMENTATION` is checked in the CMake GUI (default = OFF), CMake will try to find the doxygen and dot executables in `C/thirdparty`. Additionally, a command that builds the documentation will be added to the solution.

Additionally, the following options can be selected:
- `DOXYGEN_INCLUDE_COMMENTED_ONLY` (default = ON): If selected, only the documentation for explicitly commented entities will be generated. Otherwise, doxygen will assume that all entities are documented, even if there is no documentation available.
- `DOXYGEN_INCLUDE_INTERNAL` (default = OFF): If selected, this will include all comments preceded by "\internal". These are comments intended for developers only. So if the generated documentation is intended for external users, this option should not be selected.
- DOXYGEN_INCLUDE_EARLYBINDING (default = OFF): If selected (... and already built), this will include the selected IFC schemas in the documentation. Otherwise, the schemas will not be included in the documentation, but this does not influence the selection of IFC schemas (see EARLYBINDING_ tags in CMake GUI).
- DOXYGEN_AUTO_OPEN_DOCUMENTATION (default = ON): If selected, the landing page of the documentation will automatically open. If not selected, you will have to find and open the generated documentation manually (see section below on building the documentation).
- `DOXYGEN_INCLUDE_EARLYBINDING` (default = OFF): If selected (... and already built), this will include the selected IFC schemas in the documentation. Otherwise, the schemas will not be included in the documentation, but this does not influence the selection of IFC schemas (see EARLYBINDING_ tags in CMake GUI).
- `DOXYGEN_AUTO_OPEN_DOCUMENTATION` (default = ON): If selected, the landing page of the documentation will automatically open. If not selected, you will have to find and open the generated documentation manually (see section below on building the documentation).
Comment on lines 30 to +34
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apply here as well (prepend with OIP_).


### ConfigureDoxygen.cmake
If DOXYGEN_GENERATE_DOCUMENTATION is selected in CMake, CMake will include ConfigureDoxygen.cmake. This file includes all settings for the generation of doxygen documentation for the Open Infra Platform project. Changes to documentation settings should be made here. doxygen_add_docs() creates the GenerateDocumentation target. The up-to-date version of the file can be found here:
If `DOXYGEN_GENERATE_DOCUMENTATION` is selected in CMake, CMake will include ConfigureDoxygen.cmake. This file includes all settings for the generation of doxygen documentation for the Open Infra Platform project. Changes to documentation settings should be made here. doxygen_add_docs() creates the GenerateDocumentation target. The up-to-date version of the file can be found here:

See [file](../../cmake/ConfigureDoxygen.cmake)

#### ToDos.
The DOXYGEN_EXCLUDE_PATTERNS tag used in ConfigureDoxygen.cmake is one that is more likely to be required to change.
The `DOXYGEN_EXCLUDE_PATTERNS` tag used in ConfigureDoxygen.cmake is one that is more likely to be required to change.
It excludes certain source code directories or files from the documentation. In this project, the following directories including the following patterns are currently excluded:
- CurrentlyExcluded
- cmake
Expand All @@ -54,7 +58,7 @@ http://www.doxygen.nl/manual/index.html
Important: when adding settings in CMake, always use DOXYGEN_ before the standard doxygen tag, e.g. the doxygen tag "PROJECT_BRIEF" has to be "DOXYGEN_PROJECT_BRIEF" in the ConfigureDoxygen.cmake file.

## Building the documentation
In Visual studio, build "OpenInfraPlatform.GenerateDocumentation". This target can be found in Visual Studio under OpenInfraPlatform/Commands.
In Visual Studio, build "OpenInfraPlatform.GenerateDocumentation". This target can be found in Visual Studio under OpenInfraPlatform/Commands.
If "DOXYGEN_OPTIONAL_AUTO_OPEN_DOCUMENTATION" was selected in the CMake GUI, the landing pages of the documentation will be opened automatically if the build succeeded.
Otherwise, the documentation has to be opened manually. In your build directory under Doxymentation/html you will find something called “index.html”. Clicking on this file will open the landing page of the HTML documentation browser.

Expand Down
1 change: 1 addition & 0 deletions Documentation/markdown/SetupHelp.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ Build the project **OpenInfraPlatform.GenerateDocumentation** within *Commands*
*NOTE:* This step may take quite some time.

Read more about Doxygen in our [guidelines](./DoxygenHelp.md).
*NOTE:* Doxygen is disabled by default. See the guidelines for a description how to enable Doxygen.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*NOTE:* Doxygen is disabled by default. See the guidelines for a description how to enable Doxygen.
*NOTE:* Documentation generation is disabled by default. See the guidelines for a description of how to enable Doxygen.


Please consult our [CMake options documentation](./CMakeOptions.md) for different options available for customizing the doxygeneration.