Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
afbdb036
Commit
afbdb036
authored
10 years ago
by
Gigg, Martyn Anthony
Browse files
Options
Downloads
Patches
Plain Diff
Add docs-html target to CMake
Only added if Sphinx can be found. Refs #9521
parent
8373eb4d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/docs/CMakeLists.txt
+28
-0
28 additions, 0 deletions
Code/Mantid/docs/CMakeLists.txt
Code/Mantid/docs/runsphinx.py.in
+21
-0
21 additions, 0 deletions
Code/Mantid/docs/runsphinx.py.in
with
49 additions
and
0 deletions
Code/Mantid/docs/CMakeLists.txt
+
28
−
0
View file @
afbdb036
###############################################################################
# Sphinx documentation
###############################################################################
find_package
(
Sphinx
)
if
(
SPHINX_FOUND
)
# Fill in the config file and autogen file with build information
# We generate a target per build type, i.e docs-html
set
(
SPHINX_BUILD
${
CMAKE_BINARY_DIR
}
/docs
)
set
(
BUILDER html
)
configure_file
(
runsphinx.py.in runsphinx_html.py @ONLY
)
# targets
set
(
TARGET_PREFIX docs
)
# HTML target
add_custom_target
(
${
TARGET_PREFIX
}
-html
COMMAND
${
CMAKE_RUNTIME_OUTPUT_DIRECTORY
}
/MantidPlot -xq runsphinx_html.py
COMMENT
"Build Sphinx html documentation"
)
endif
()
###############################################################################
# QtAssistant
###############################################################################
if
(
APPLE
)
if
(
APPLE
)
set
(
ENABLE_QTASSISTANT False CACHE BOOL
"Build qt-assistant documentation"
)
set
(
ENABLE_QTASSISTANT False CACHE BOOL
"Build qt-assistant documentation"
)
else
()
else
()
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/docs/runsphinx.py.in
0 → 100644
+
21
−
0
View file @
afbdb036
"""We need to run Sphinx inside MantidPlot to document the internal
module. This script calls the sphinx entry point with the necessary
arguments
"""
__requires__ = 'Sphinx'
import sys
import os
from pkg_resources import load_entry_point
mantidplot = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/MantidPlot"
builder = "@BUILDER@"
src_dir = "@CMAKE_CURRENT_SOURCE_DIR@/source"
output_dir = os.path.join("@SPHINX_BUILD@", builder)
argv = [mantidplot,'-b', builder, src_dir, output_dir]
if __name__ == '__main__':
sys.exit(
load_entry_point(__requires__, 'console_scripts', 'sphinx-build')(argv)
)
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