Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sassena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DAPHNE4NFDI
Sassena
Commits
536eb40a
Commit
536eb40a
authored
1 year ago
by
Daniel Vonk
Committed by
Daniel Vonk
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Build scripts for sphinx
parent
f48cfbeb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!19
Merge develop into main
,
!13
Add CI System to Sassena and Modernize Build-System
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/CMakeLists.txt
+71
-0
71 additions, 0 deletions
docs/CMakeLists.txt
docs/index.rst
+4
-0
4 additions, 0 deletions
docs/index.rst
with
75 additions
and
0 deletions
docs/CMakeLists.txt
+
71
−
0
View file @
536eb40a
...
...
@@ -29,7 +29,78 @@ set(DOXYGEN_DOT_TRANSPARENT YES)
set
(
DOXYGEN_GENERATE_HTML YES
)
set
(
DOXYGEN_GENERATE_MAN NO
)
set
(
DOXYGEN_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/doxygen
)
set
(
MIXED_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/mixedout
)
set
(
CMAKE_CURRENT_LIST_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
)
set
(
SPHINX_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/sphinx
)
doxygen_add_docs
(
sass-doxygen-docs
${
PROJECT_SOURCE_DIR
}
/src
${
CMAKE_CURRENT_SOURCE_DIR
}
COMMENT
"Generates doxygen documentation"
)
find_program
(
SPHINX_EXECUTABLE
NAMES sphinx-build
DOC
"Path to sphinx-build executable"
)
if
(
NOT SPHINX_EXECUTABLE
)
message
(
FATAL_ERROR
"SASS_BUILD_DOCS or BUILD_DOCS was requested but Sphinx could not be found. "
"Install sphinx and its modules, or re-run CMake with doc building disabled."
)
endif
()
# Install doxysphinx, used to convert Doxygen's output to markdown
find_program
(
DOXYSPHINX_EXECUTABLE doxysphinx
)
if
(
NOT DOXYSPHINX_EXECUTABLE
)
message
(
FATAL_ERROR
"
\n
doxysphinx (a Doxygen HTML to reStructureText converter) could not be found. "
"This tool is required to build the API documentation. Consider installing it by "
"following the directions at https://boschglobal.github.io/doxysphinx/docs/getting_started.html."
)
endif
()
file
(
GLOB _sphinx_sources *.rst
)
# add_custom_command(
# OUTPUT docs-sphinx
# COMMAND ${SPHINX_EXECUTABLE} -b html -d _build/doctrees . _build/html
# COMMENT "Building HTML documentation with Sphinx"
# )
file
(
GLOB _top_level_rst_and_md_files *.md *.rst
)
add_custom_command
(
OUTPUT docs-sass-doxysphinx
# Copy Sphinx sources
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
CMAKE_CURRENT_SOURCE_DIR
}
/sphinx
${
MIXED_OUTPUT_DIRECTORY
}
/sphinx/docs
COMMAND
${
CMAKE_COMMAND
}
-E copy_if_different
${
_top_level_rst_and_md_files
}
${
MIXED_OUTPUT_DIRECTORY
}
/sphinx/docs
# Copy Doxygen sources
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
DOXYGEN_OUTPUT_DIRECTORY
}
${
MIXED_OUTPUT_DIRECTORY
}
/sphinx/docs/doxygen
# Run doxysphinx to convert Doxygen output into Sphinx compatible output.
COMMAND
${
DOC_PYTHON_ENV
}
${
DOXYSPHINX_EXECUTABLE
}
build
${
MIXED_OUTPUT_DIRECTORY
}
/sphinx/docs
${
SPHINX_OUTPUT_DIRECTORY
}
${
MIXED_OUTPUT_DIRECTORY
}
/sphinx/docs/doxygen/html
# Call to run Doxygen prior to this block
DEPENDS sass-doxygen-docs
WORKING_DIRECTORY
${
DOXYGEN_OUTPUT_DIRECTORY
}
COMMENT
"Preparing Sphinx and Doxygen files for merging"
)
# Build Sphinx documentation
add_custom_command
(
OUTPUT docs-sass-sphinx
COMMAND
${
DOC_PYTHON_ENV
}
${
Python3_EXECUTABLE
}
${
SPHINX_EXECUTABLE
}
-b html
${
MIXED_OUTPUT_DIRECTORY
}
/sphinx/docs
${
SPHINX_OUTPUT_DIRECTORY
}
-c
${
CMAKE_CURRENT_LIST_DIR
}
/sphinx -Wj auto
WORKING_DIRECTORY
${
MIXED_OUTPUT_DIRECTORY
}
/sphinx/docs
DEPENDS docs-sass-doxysphinx
MAIN_DEPENDENCY
${
CMAKE_CURRENT_LIST_DIR
}
/sphinx/conf.py
COMMENT
"Generating documentation with Sphinx"
)
# Auto start generating documentation as part of ALL
add_custom_target
(
docs-sass ALL
DEPENDS docs-sass-sphinx
COMMENT
"Starting to generate Sphinx documentation."
)
This diff is collapsed.
Click to expand it.
docs/index.rst
0 → 100644
+
4
−
0
View file @
536eb40a
Sassena
======
*Sassena* docs generated by sphinx
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment