xo-cmake: + xo-build --build-docs

This commit is contained in:
Roland Conybeare 2025-06-12 07:35:46 -05:00
commit 070fba8010

View file

@ -27,6 +27,7 @@ Options:
--configure run cmake for xo library NAME in immediate subdir
Will use NAME/.build as build directory
--build run cmake build for xo library NAME in immediate subdir
--build-docs build documentation for xo library NAME in immediate subdir
--install run cmake install for xo library NAME in immediate subdir
-S=SOURCEDIR override path/to/source
-B=BUILDDIR override path/to/build
@ -86,6 +87,9 @@ while [[ $# > 0 ]]; do
--build)
build_flag=1
;;
--build-docs)
build_docs_flag=1
;;
--install)
install_flag=1
;;
@ -207,6 +211,18 @@ if [[ $build_flag -eq 1 ]]; then
fi
fi
if [[ $build_docs_flag -eq 1 ]]; then
if [[ -n "$xoname" ]]; then
cmd="cmake --build $pathtobuild -- docs"
if [[ $noop_flag -eq 1 ]]; then
echo $cmd
else
$cmd
fi
fi
fi
if [[ $install_flag -eq 1 ]]; then
if [[ -n "$xoname" ]]; then
cmd="cmake --install $pathtobuild"