mirror of
https://github.com/USCiLab/cereal.git
synced 2025-10-18 01:45:52 +02:00
Added update-doc target
This commit is contained in:
@@ -15,18 +15,17 @@ endif(Boost_FOUND)
|
|||||||
|
|
||||||
find_package(Doxygen)
|
find_package(Doxygen)
|
||||||
if(DOXYGEN_FOUND)
|
if(DOXYGEN_FOUND)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
|
|
||||||
|
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
|
||||||
add_custom_target(doc
|
add_custom_target(doc
|
||||||
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
|
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||||
)
|
)
|
||||||
|
|
||||||
set(DOC_DEST ${CMAKE_CURRENT_SOURCE_DIR}/assets/doxygen)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/updatedoc.in ${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh @ONLY)
|
||||||
set(DOC_SRC ${CMAKE_CURRENT_BINARY_DIR}/doc/html)
|
|
||||||
add_custom_target(update-doc
|
add_custom_target(update-doc
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/updatedoc.sh
|
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh
|
||||||
DEPENDS doc
|
DEPENDS doc
|
||||||
COMMENT "Copying documentation to gh-pages branch" VERBATIM
|
COMMENT "Copying documentation to gh-pages branch" VERBATIM
|
||||||
)
|
)
|
||||||
|
|||||||
1870
doc/doxygen.in
Normal file
1870
doc/doxygen.in
Normal file
File diff suppressed because it is too large
Load Diff
12
scripts/renameincludes.sh
Executable file
12
scripts/renameincludes.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
destdir="include_renamed"
|
||||||
|
|
||||||
|
echo -n "New prefix: "
|
||||||
|
read newprefix
|
||||||
|
|
||||||
|
cp -r include ${destdir}
|
||||||
|
|
||||||
|
newprefix=$(echo ${newprefix} | sed -e 's/\//\\\//')
|
||||||
|
|
||||||
|
find ${destdir} -name '*.hpp' -exec sed -i "s/#include <cereal/#include <${newprefix}\/cereal/" {} \;
|
||||||
18
scripts/updatecoverage.sh
Executable file
18
scripts/updatecoverage.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Updates the coverage documentation, and copies it into the appropriate place
|
||||||
|
# in the gh-pages branch.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
tempdir=`mktemp -d`
|
||||||
|
|
||||||
|
make coverage COVERAGE_OUTPUT=${tempdir}/coverage
|
||||||
|
|
||||||
|
git checkout gh-pages
|
||||||
|
|
||||||
|
rm -rf assets/coverage
|
||||||
|
|
||||||
|
cp -r ${tempdir}/coverage* assets/coverage/
|
||||||
|
|
||||||
|
rm -rf ${tempdir}
|
||||||
25
scripts/updatedoc.in
Executable file
25
scripts/updatedoc.in
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Updates the doxygen documentation, and copies it into the appropriate place
|
||||||
|
# in the gh-pages branch.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
tempdir=`mktemp -d`
|
||||||
|
branch=`git rev-parse --abbrev-ref HEAD`
|
||||||
|
|
||||||
|
cp -r @CMAKE_CURRENT_BINARY_DIR@/doc/html/ ${tempdir}
|
||||||
|
|
||||||
|
git stash
|
||||||
|
git checkout gh-pages-1.0
|
||||||
|
|
||||||
|
rm -rf @CMAKE_CURRENT_SOURCE_DIR@/assets/doxygen
|
||||||
|
mkdir @CMAKE_CURRENT_SOURCE_DIR@/assets/doxygen
|
||||||
|
cp -r ${tempdir}/html/* @CMAKE_CURRENT_SOURCE_DIR@/assets/doxygen/
|
||||||
|
|
||||||
|
rm -rf ${tempdir}
|
||||||
|
|
||||||
|
git commit @CMAKE_CURRENT_SOURCE_DIR@/assets/doxygen
|
||||||
|
|
||||||
|
git checkout ${branch}
|
||||||
|
git stash apply
|
||||||
Reference in New Issue
Block a user