Skip to content

Commit

Permalink
Build Doxygen docs in whatever the CMake build directory is (#1357)
Browse files Browse the repository at this point in the history
* Build Doxygen docs in whatever the CMake build directory is

Fixes #1341.

* Missing Doxygen build directory in CI
  • Loading branch information
dstebila authored Jan 13, 2023
1 parent f272232 commit aed3b49
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
command: python3 -m pytest --verbose tests/test_code_conventions.py
- run:
name: Check that doxygen can parse the documentation
command: mkdir -p build/docs && ./scripts/run_doxygen.sh doxygen docs/.Doxyfile
command: mkdir -p build/docs && ./scripts/run_doxygen.sh doxygen docs/.Doxyfile build/docs

buildcheck:
description: Test that we can build a single KEM/Signature pair as part of a minimal build.
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ if(NOT ${OQS_BUILD_ONLY_LIB})
set(DOXYFILE ${PROJECT_SOURCE_DIR}/docs/.Doxyfile)
add_custom_target(
gen_docs
COMMAND ${PROJECT_SOURCE_DIR}/scripts/run_doxygen.sh ${DOXYGEN_EXECUTABLE} ${DOXYFILE}
COMMAND ${PROJECT_SOURCE_DIR}/scripts/run_doxygen.sh ${DOXYGEN_EXECUTABLE} ${DOXYFILE} ${PROJECT_BINARY_DIR}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate API documentation with Doxygen."
USES_TERMINAL)
Expand Down
2 changes: 1 addition & 1 deletion docs/.Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = build/docs
OUTPUT_DIRECTORY = $(DOXYGEN_DESTIONATION_DIR)

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down
7 changes: 4 additions & 3 deletions scripts/run_doxygen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# SPDX-License-Identifier: MIT

if [ "$#" -ne 2 ]; then
echo "Wrong number of arguments: Expecting path to doxygen binary and doxygen file. Exiting."
if [ "$#" -ne 3 ]; then
echo "Wrong number of arguments: Expecting path to doxygen binary, path to doxygen file, and destination directory. Exiting."
exit 1
fi

Expand All @@ -14,7 +14,8 @@ cp CONFIGURE.md CONFIGURE.md-orig
python3 scripts/doxyfy.py CONFIGURE.md-orig CONFIGURE.md

# run doxygen:
$1 $2
mkdir -p "$3/docs"
env DOXYGEN_DESTIONATION_DIR="$3/docs" "$1" "$2"
EXITCODE=$?

# undo the Github Markdown reformatting
Expand Down

0 comments on commit aed3b49

Please # to comment.