Skip to content
Snippets Groups Projects
Commit 71250e7f authored by Markus Blatt's avatar Markus Blatt
Browse files

Rudimentarily build the doxygen documentation.

[[Imported from SVN: r6623]]
parent a6153abf
Branches
Tags
No related merge requests found
FIND_PACKAGE(Doxygen)
#
# Set DOT_TRUE for the Doxyfile generation.
#
if (NOT DOXYGEN_DOT_FOUND)
set(DOT_TRUE '\#')
endif (NOT DOXYGEN_DOT_FOUND)
message('${DOT_TRUE}')
#
# prepare_doyfile()
# prepare_doxyfile()
# This functions adds the necessary routines for the generation of the Doxyfile[.in] files needed to doxygen.
FUNCTION (prepare_doxyfile)
set(make_doxyfile_command ${CMAKE_COMMAND} -D DUNE_MOD_NAME=${DUNE_MOD_NAME} -D DUNE_MOD_VERSION=${DUNE_MOD_VERSION} -D DOXYSTYLE=${CMAKE_CURRENT_SOURCE_DIR}/Doxystyle -D DOXYLOCAL=${CMAKE_CURRENT_SOURCE_DIR}/Doxylocal -D abs_top_srcdir=${CMAKE_SOURCE_DIR} -D srcdir=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/CreateDoxyFile.cmake)
MACRO (prepare_doxyfile)
set(make_doxyfile_command ${CMAKE_COMMAND} -D DOT_TRUE=${DOT_TRUE} -D DUNEWEB_TRUE=\# -D DUNE_MOD_NAME=${DUNE_MOD_NAME} -D DUNE_MOD_VERSION=${DUNE_MOD_VERSION} -D DOXYSTYLE=${CMAKE_CURRENT_SOURCE_DIR}/Doxystyle -D DOXYLOCAL=${CMAKE_CURRENT_SOURCE_DIR}/Doxylocal -D abs_top_srcdir=${CMAKE_SOURCE_DIR} -D srcdir=${CMAKE_CURRENT_SOURCE_DIR} -D top_srcdir=${CMAKE_SOURCE_DIR} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/CreateDoxyFile.cmake)
add_custom_command (OUTPUT Doxyfile.in Doxyfile
COMMAND ${make_doxyfile_command} COMMENT "Creating Doxyfile.in")
add_custom_target(Doxyfile DEPENDS Doxyfile.in Doxyfile)
ENDFUNCTION (prepare_doxyfile)
ENDMACRO (prepare_doxyfile)
MACRO (add_doxygen_target)
prepare_doxyfile()
add_custom_target(doxygen COMMAND
${DOXYGEN_EXECUTABLE} Doxyfile
COMMENT "Running doxygen documentation" DEPENDS Doxyfile )
add_dependencies(doc doxygen)
ENDMACRO (add_doxygen_target)
......@@ -5,6 +5,10 @@ FILE(WRITE Doxyfile.in ${file_contents})
FILE(READ ${DOXYLOCAL} file_contents)
FILE(APPEND Doxyfile.in ${file_contents})
message("Generating Doxyfile")
# configure_file does not work as it insists an existing input file, which in our
# needs to be generated first.
# Therfore we read the Doxyfile.in and replace the variables using STRING(CONFIGURE)
# and the write the file.
FILE(READ Doxyfile.in file_contents)
STRING(CONFIGURE ${file_contents} output)
FILE(WRITE Doxyfile ${output})
# quickhack for creating the Doxyfile.in and Doxyfile
include(DUNEDoxygen)
prepare_doxyfile()
add_dependencies(doc Doxyfile)
add_doxygen_target()
install(FILES Doxystyle DESTINATION share/dune-common/doc/doxygen)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment