From 1e94a463edc58648351e9c301950895895e7c7e1 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 29 Jun 2024 08:49:01 -0700 Subject: [PATCH] Create build dir --- support/python/mkdocstrings_handlers/cxx/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/support/python/mkdocstrings_handlers/cxx/__init__.py b/support/python/mkdocstrings_handlers/cxx/__init__.py index 32e0f75e..03c0c056 100644 --- a/support/python/mkdocstrings_handlers/cxx/__init__.py +++ b/support/python/mkdocstrings_handlers/cxx/__init__.py @@ -162,9 +162,11 @@ class CxxHandler(BaseHandler): top_dir = os.path.dirname(support_dir) include_dir = os.path.join(top_dir, 'include', 'fmt') self._ns2doxyxml = {} - self._doxyxml_dir = os.path.join(top_dir, 'build', 'doxyxml') + build_dir = os.path.join(top_dir, 'build') + os.mkdirs(build_dir, exists_ok=True) + self._doxyxml_dir = os.path.join(build_dir, 'doxyxml') p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT) - out, _ = p.communicate(input=r''' + _, _ = p.communicate(input=r''' PROJECT_NAME = fmt GENERATE_XML = YES GENERATE_LATEX = NO @@ -188,7 +190,7 @@ class CxxHandler(BaseHandler): ' '.join([os.path.join(include_dir, h) for h in headers]), self._doxyxml_dir).encode('utf-8')) if p.returncode != 0: - raise CalledProcessError(p.returncode, cmd) + raise CalledProcessError(p.returncode, cmd) # Merge all file-level XMLs into one to simplify search. self._file_doxyxml = None