File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ function(_setup_doxyrest)
47
47
set (DOXYREST_OUTPUT_DIR_NAME dpctl-capi-doxyrest )
48
48
set (DOXYREST_OUTPUT_DIR
49
49
${CMAKE_CURRENT_SOURCE_DIR} /${DOXYREST_OUTPUT_DIR_NAME}
50
+ PARENT_SCOPE
51
+ )
52
+ set (DOXYREST_OUTPUT_DIR
53
+ ${CMAKE_CURRENT_SOURCE_DIR} /${DOXYREST_OUTPUT_DIR_NAME}
54
+
50
55
)
51
56
set (DOXYREST_CONFIG_IN ${CMAKE_CURRENT_SOURCE_DIR} /doxyrest-config.lua.in )
52
57
set (DOXYREST_CONFIG_OUT ${CMAKE_CURRENT_SOURCE_DIR} /doxyrest-config.lua )
@@ -81,7 +86,6 @@ function(_setup_sphinx)
81
86
set (SPHINX_INDEX_FILE ${SPHINX_OUTPUT_DIR} /index.html )
82
87
set (SPHINX_CONF_IN ${SPHINX_SOURCE} /conf.in )
83
88
set (SPHINX_CONF_OUT ${SPHINX_SOURCE} /conf.py )
84
-
85
89
# Only regenerate Sphinx when:
86
90
# - Doxygen has rerun
87
91
# - Our doc files have been updated
Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ if use_doxyrest == "ON":
47
47
os .path .abspath ("@DOXYREST_SPHINX_DIR@" ),
48
48
)
49
49
extensions += ["doxyrest" , "cpplexer" ]
50
+ # A workaround to fix issues leftover in the doxyrest generated
51
+ # rst files.
52
+ import fileinput
53
+
54
+ with fileinput .FileInput ("@DOXYREST_OUTPUT_DIR@/global.rst" , inplace = True ) as file :
55
+ for line in file :
56
+ print (line .replace ("typedefDPCTL_C_EXTERN_C_BEGIN" , "" ), end = "" )
50
57
51
58
# Add any paths that contain templates here, relative to this directory.
52
59
templates_path = ["_templates" ]
You can’t perform that action at this time.
0 commit comments