Skip to content

Commit

Permalink
Tweak conf.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtv committed Mar 31, 2024
1 parent 494b0e9 commit ee78906
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@
import sys


source_dir = Path(__file__).parents[1].absolute()
build_dir = Path.cwd().parent.absolute()

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, make it absolute, like shown here.
sys.path.insert(0, Path(__file__).parents[1].absolute())
sys.path.insert(0, source_dir)

breathe_projects = {}
breathe_projects = {
'libpqxx': (build_dir / 'xml'),
}
breathe_default_project = 'libpqxx'

if os.environ.get('READTHEDOCS', '').strip() == 'True':
source_dir = Path(__file__).parents[1]
build_dir = Path.cwd().parent.absolute()
# C++23: Upgrade C++ version.
check_call(
[source_dir / 'configure', 'CXXFLAGS=-std=c++20 -O0'], cwd=build_dir)
check_call('doxygen', cwd=(build_dir / 'doc'))
breathe_projects['libpqxx'] = (build_dir / 'xml')


# -- General configuration ------------------------------------------------
Expand Down

0 comments on commit ee78906

Please sign in to comment.