This GitLab instance will be migrated to gitlab.mel.vin before 2020-06-01 and will lose the shared runners, setup your own runners if needed.

Commit 7cd8c31f authored by Vermeeren's avatar Vermeeren

doc: simplify py modules, add sphinxcontrib.plantuml

parent dc6d9ecd
function(find_python_module module)
string(TOUPPER "${module}" module_u)
function(find_python_module module module_u)
if(${module_u}_FOUND)
return()
......
......@@ -32,22 +32,24 @@ else()
find_package(PythonInterp REQUIRED)
include(find_python_module)
find_python_module(breathe)
find_python_module(sphinx)
# do not change the ENV, doesn't work with add_custom_target
# https://cmake.org/Bug/view.php?id=5145
if(ENV{PYTHONPATH})
set(PYTHONPATH
"${BREATHE_PATH}:${SPHINX_PATH}:$ENV{PYTHONPATH}")
set(PYTHONPATH "$ENV{PYTHONPATH}")
else()
# PYTHONPATH disables defaults, manually append them
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
"import sys; sys.stdout.write(':'.join(sys.path))"
OUTPUT_VARIABLE PYTHONPATH)
set(PYTHONPATH "${BREATHE_PATH}:${SPHINX_PATH}:${PYTHONPATH}")
"import sys; sys.stdout.write(':'.join(sys.path))"
OUTPUT_VARIABLE PYTHONPATH)
endif()
foreach(module breathe sphinx sphinxcontrib.plantuml)
string(TOUPPER "${module}" module_upper)
find_python_module("${module}" "${module_upper}")
set(PYTHONPATH "${${module_upper}_PATH}:${PYTHONPATH}")
endforeach(module)
if(${WERROR})
set(SPHINX_WERROR "-W")
else()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment