Skip to content

Commit 0ec4c22

Browse files
Krishna-13-cybervgvassilev
authored andcommitted
Update changes for documentation configuration
1 parent 0ed0781 commit 0ec4c22

File tree

5 files changed

+60
-12
lines changed

5 files changed

+60
-12
lines changed

.readthedocs.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ sphinx:
55
builder: html
66

77
build:
8-
image: latest
8+
os: "ubuntu-22.04"
9+
tools:
10+
python: "3.11"
911
apt_packages:
10-
- clang-14
12+
- clang-13
1113
- cmake
12-
- libclang-14-dev
13-
- llvm-14-dev
14-
- llvm-14-tools
14+
- libclang-13-dev
15+
- llvm-13-dev
16+
- llvm-13-tools

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,4 +355,4 @@ if (CPPINTEROP_INCLUDE_DOCS)
355355
endif()
356356

357357
add_subdirectory(lib)
358-
add_subdirectory(unittests)
358+
add_subdirectory(unittests)

cmake/FindSphinx.cmake

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# CMake find_package() Module for Sphinx documentation generator
2+
# http://sphinx-doc.org/
3+
#
4+
# Example usage:
5+
#
6+
# find_package(Sphinx)
7+
#
8+
# If successful the following variables will be defined
9+
# SPHINX_FOUND
10+
# SPHINX_EXECUTABLE
11+
12+
find_program(SPHINX_EXECUTABLE
13+
NAMES sphinx-build sphinx-build2
14+
DOC "Path to sphinx-build executable")
15+
16+
# Handle REQUIRED and QUIET arguments
17+
# this will also set SPHINX_FOUND to true if SPHINX_EXECUTABLE exists
18+
include(FindPackageHandleStandardArgs)
19+
find_package_handle_standard_args(Sphinx
20+
"Failed to locate sphinx-build executable"
21+
SPHINX_EXECUTABLE)
22+
23+
# Provide options for controlling different types of output
24+
option(SPHINX_OUTPUT_HTML "Output standalone HTML files" ON)
25+
option(SPHINX_OUTPUT_MAN "Output man pages" ON)
26+
27+
option(SPHINX_WARNINGS_AS_ERRORS "When building documentation treat warnings as errors" ON)

docs/DevelopersDocumentation.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ CppInterOp Internal Documentation
3232
CppInterOp maintains an internal Doxygen documentation of its components. Internal
3333
documentation aims to capture intrinsic details and overall usage of code
3434
components. The goal of internal documentation is to make the codebase easier
35-
to understand for the new developers.
35+
to understand for the new developers.
36+
Internal documentation can be visited : `here </en/latest/build/html/index.html>`_

docs/conf.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,33 @@
2525
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
2626

2727
html_theme = 'alabaster'
28-
html_static_path = ['_static']
2928

30-
CPPINTEROP_ROOT = '..'
29+
html_theme_options = {
30+
"github_user": "compiler-research",
31+
"github_repo": "CppInterOp",
32+
"github_banner": True,
33+
"fixed_sidebar": True,
34+
}
3135

32-
# html_extra_path = [CPPINTEROP_ROOT + '/build/docs/doxygen/html']
36+
highlight_language = "C++"
37+
38+
todo_include_todos = True
39+
40+
mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
41+
42+
# Add latex physics package
43+
mathjax3_config = {
44+
"loader": {"load": ["[tex]/physics"]},
45+
"tex": {"packages": {"[+]": ["physics"]}},
46+
}
47+
48+
import os
49+
CPPINTEROP_ROOT = os.path.abspath('..')
50+
html_extra_path = [CPPINTEROP_ROOT + '/build/docs/']
3351

3452
import subprocess
35-
command = 'mkdir {0}/build; cd {0}/build; cmake ../ -DClang_DIR=/usr/lib/llvm-14/lib/cmake/clang\
36-
-DLLVM_DIR=/usr/lib/llvm-14 -DCPPINTEROP_ENABLE_DOXYGEN=ON\
53+
command = 'mkdir {0}/build; cd {0}/build; cmake ../ -DClang_DIR=/usr/lib/llvm-13/build/lib/cmake/clang\
54+
-DLLVM_DIR=/usr/lib/llvm-13/build/lib/cmake/llvm -DCPPINTEROP_ENABLE_DOXYGEN=ON\
3755
-DCPPINTEROP_INCLUDE_DOCS=ON'.format(CPPINTEROP_ROOT)
3856
subprocess.call(command, shell=True)
3957
subprocess.call('doxygen {0}/build/docs/doxygen.cfg'.format(CPPINTEROP_ROOT), shell=True)

0 commit comments

Comments
 (0)