Skip to content
Snippets Groups Projects
Commit 631683cd authored by Thomas Fetzer's avatar Thomas Fetzer Committed by Kilian Weishaupt
Browse files

[doxygen,cmake] Sanitize links for doxygen, a cmake macros is necessary for this

Add preprocessor deprecations to deprecation list in doxygen
parent 9702abcc
No related branches found
No related tags found
1 merge request!39Feature/doxyref
...@@ -2,6 +2,7 @@ set(modules ...@@ -2,6 +2,7 @@ set(modules
AddInputFileLinks.cmake AddInputFileLinks.cmake
CheckConstexpr.cmake CheckConstexpr.cmake
CopyOfDuneSymlinkOrCopy.cmake CopyOfDuneSymlinkOrCopy.cmake
DumuxDoxygen.cmake
DumuxMacros.cmake DumuxMacros.cmake
DumuxTestMacros.cmake) DumuxTestMacros.cmake)
include(GNUInstallDirs) include(GNUInstallDirs)
......
# add_dumux_doxgen_target
#
# make sure, that the doxygen links to todo list, bibliography, etc. are correct
MACRO (add_dumux_doxygen_target)
add_doxygen_target()
add_custom_command(TARGET doxygen_${ProjectName}
POST_BUILD
COMMAND ${CMAKE_SOURCE_DIR}/doc/doxygen/sanitizelinks.sh)
ENDMACRO (add_dumux_doxygen_target)
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
include(CheckConstexpr) include(CheckConstexpr)
# additional macros # additional macros
include(AddInputFileLinks) include(AddInputFileLinks)
include(DumuxDoxygen)
include(DumuxTestMacros) include(DumuxTestMacros)
find_package(Gnuplot) find_package(Gnuplot)
......
# shortcut for creating the Doxyfile.in and Doxyfile # shortcut for creating the Doxyfile.in and Doxyfile
add_doxygen_target() add_dumux_doxygen_target()
...@@ -24,8 +24,11 @@ EXTRA_PACKAGES += amsmath,amssymb,units ...@@ -24,8 +24,11 @@ EXTRA_PACKAGES += amsmath,amssymb,units
SEARCHENGINE = YES SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO SERVER_BASED_SEARCH = NO
# disable macro expansion (Otherwise, certain properties will not appear # the bibliography file used for the doxygen documentation
# in the documentation properly. This should be fixed at some time.) CITE_BIB_FILES = @top_srcdir@/doc/handbook/dumux-handbook.bib
MACRO_EXPANSION = NO
# enable macro expansion only for specified macros
CITE_BIB_FILES = @top_srcdir@/doc/handbook/dumux-handbook MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
PREDEFINED = "DUNE_DEPRECATED:=/** \deprecated */" \
"DUNE_DEPRECATED_MSG(A):=/** \deprecated A */"
# sanitizes the links to the given lists, because doxygen somehow links
# to a page with a wrong index
function sanitizelinks {
NEW_FILE=`grep -l "\"title\">$1" html/*html | egrep -o [0-9]+`
OLD_FILE=`awk -v a=$NEW_FILE 'BEGIN {printf("%05d", a-1)}'`
sed -i "s/$OLD_FILE/$NEW_FILE/g" html/*html
}
sanitizelinks "Todo List"
sanitizelinks "Bug List"
sanitizelinks "Deprecated List"
sanitizelinks "Bibliography"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment