Skip to content

Commit

Permalink
Use existence of doxygen directory to set C++ API line (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkent authored Jun 27, 2024
1 parent 446b31b commit 560a8d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rosdoc2/verbs/build/builders/sphinx_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,15 @@ def __init__(self, builder_name, builder_entry_dictionary, build_context):
def build(self, *, doc_build_folder, output_staging_directory):
"""Actually do the build."""
# Check that doxygen_xml_directory exists relative to output staging, if specified.
has_cpp = False
if self.doxygen_xml_directory is not None:
self.doxygen_xml_directory = \
os.path.join(output_staging_directory, self.doxygen_xml_directory)
self.doxygen_xml_directory = os.path.abspath(self.doxygen_xml_directory)

if not os.path.isdir(self.doxygen_xml_directory):
if os.path.isdir(self.doxygen_xml_directory):
has_cpp = True
else:
self.doxygen_xml_directory = None
logger.info('No doxygen_xml_directory found, apparently doxygen did not run')
if self.build_context.always_run_doxygen:
Expand Down Expand Up @@ -469,8 +472,6 @@ def build(self, *, doc_build_folder, output_staging_directory):
build_context.always_run_sphinx_apidoc or \
build_context.ament_cmake_python

always_run_doxygen = build_context.always_run_doxygen
has_cpp = build_context.build_type in ['ament_cmake', 'cmake'] or always_run_doxygen
self.template_variables.update({
'has_python': has_python,
'has_cpp': has_cpp,
Expand Down

0 comments on commit 560a8d8

Please sign in to comment.