forked from toppers/hakoniwa-core-cpp-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.bash
More file actions
executable file
·30 lines (24 loc) · 872 Bytes
/
docs.bash
File metadata and controls
executable file
·30 lines (24 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -euo pipefail
# Simple helper to build Doxygen docs via CMake
# Usage: ./docs.bash [build-dir]
BUILD_DIR=${1:-cmake-build}
# Check doxygen availability
if ! command -v doxygen >/dev/null 2>&1; then
echo "[ERROR] doxygen が見つかりません。macOS の場合: brew install doxygen" >&2
exit 1
fi
# Configure CMake with docs enabled
cmake -S . -B "${BUILD_DIR}" -DBUILD_DOCS=ON -DCMAKE_BUILD_TYPE=Release
# Build docs target
cmake --build "${BUILD_DIR}" --target docs -- -j
OUT_HTML="${BUILD_DIR}/docs/html/index.html"
if [ -f "${OUT_HTML}" ]; then
echo "[INFO] ドキュメントを生成しました: ${OUT_HTML}"
# On macOS, try to open in default browser
if command -v open >/dev/null 2>&1; then
open "${OUT_HTML}" || true
fi
else
echo "[WARN] 期待する出力が見つかりませんでした: ${OUT_HTML}" >&2
fi