diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/CMakeLists.txt | 3 | ||||
-rw-r--r-- | docs/conf.py.in | 5 | ||||
-rw-r--r-- | docs/python/CMakeLists.txt | 21 | ||||
-rw-r--r-- | docs/python/python.rst | 6 |
4 files changed, 34 insertions, 1 deletions
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index b08668afa..4c5d9aa6c 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -18,6 +18,7 @@ check_python_module(sphinxcontrib.bibtex sphinxcontrib-bibtex) check_python_module(sphinx_tabs.tabs sphinx-tabs) add_subdirectory(cpp) +add_subdirectory(python) set(SPHINX_INPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(SPHINX_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/sphinx) @@ -25,7 +26,7 @@ set(SPHINX_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/sphinx) configure_file(conf.py.in ${CMAKE_CURRENT_BINARY_DIR}/conf.py) add_custom_target(docs ALL - DEPENDS docs-cpp + DEPENDS docs-cpp docs-python COMMAND ${SPHINX_EXECUTABLE} -b html -c ${CMAKE_CURRENT_BINARY_DIR} diff --git a/docs/conf.py.in b/docs/conf.py.in index 28e8fa04c..f6e75b9b5 100644 --- a/docs/conf.py.in +++ b/docs/conf.py.in @@ -18,6 +18,11 @@ sys.path.insert(0, '${CMAKE_CURRENT_SOURCE_DIR}/ext/') # path to python api sys.path.insert(0, '${CMAKE_BINARY_DIR}/src/api/python') +if("${BUILD_BINDINGS_PYTHON}" == "ON"): + tags.add('bindings_python') +if("${BUILD_BINDINGS_JAVA}" == "ON"): + tags.add('bindings_java') + # -- Project information ----------------------------------------------------- diff --git a/docs/python/CMakeLists.txt b/docs/python/CMakeLists.txt new file mode 100644 index 000000000..cdac14de0 --- /dev/null +++ b/docs/python/CMakeLists.txt @@ -0,0 +1,21 @@ +############################################################################### +# Top contributors (to current version): +# Gereon Kremer +# +# This file is part of the cvc5 project. +# +# Copyright (c) 2009-2021 by the authors listed in the file AUTHORS +# in the top-level source directory and their institutional affiliations. +# All rights reserved. See the file COPYING in the top-level source +# directory for licensing information. +# ############################################################################# +# +# Build system configuration for python API documentation. +## + +add_custom_target(docs-python) + +if (BUILD_BINDINGS_PYTHON) + # Python API docs are generated from built python API + add_dependencies(docs-python pycvc5) +endif() diff --git a/docs/python/python.rst b/docs/python/python.rst index 6d094488f..50d9077df 100644 --- a/docs/python/python.rst +++ b/docs/python/python.rst @@ -1,6 +1,12 @@ Python API Documentation ======================== +.. only:: not bindings_python + + .. warning:: + + This documentation was built while python bindings were disabled. This part of the documentation is likely either empty or outdated. Please enable :code:`BUILD_BINDINGS_PYTHON` in :code:`cmake` and build the documentation again. + .. toctree:: :maxdepth: 2 |