From 2cfafb3321eaf6c3237488bbfe33faf2bbd646b8 Mon Sep 17 00:00:00 2001 From: maier Date: Thu, 20 Sep 2012 15:08:39 +0000 Subject: [PATCH] update git-svn-id: https://svn.dealii.org/branches/branch_cmake@26571 0785d39b-7218-0410-832d-ea1e28bc413d --- .../macros/macro_expand_instantiations.cmake | 5 +- .../cmake/macros/macro_to_string.cmake | 7 ++ deal.II/doc/CMakeLists.txt | 42 +++++----- deal.II/doc/doxygen/CMakeLists.txt | 82 +++++++++++++++++++ deal.II/doc/doxygen/header.html.in | 2 +- deal.II/doc/doxygen/header.tex.in | 2 +- deal.II/doc/doxygen/options.dox.in | 10 +-- deal.II/doc/title.html.in | 2 +- 8 files changed, 117 insertions(+), 35 deletions(-) create mode 100644 deal.II/contrib/cmake/macros/macro_to_string.cmake create mode 100644 deal.II/doc/doxygen/CMakeLists.txt diff --git a/deal.II/contrib/cmake/macros/macro_expand_instantiations.cmake b/deal.II/contrib/cmake/macros/macro_expand_instantiations.cmake index 7336bff86a..d4084e5cb9 100644 --- a/deal.II/contrib/cmake/macros/macro_expand_instantiations.cmake +++ b/deal.II/contrib/cmake/macros/macro_expand_instantiations.cmake @@ -30,10 +30,7 @@ MACRO(macro_expand_instantiations target inst_in_files) > ${CMAKE_CURRENT_BINARY_DIR}/${inst_file} ) - SET(inst_targets - ${CMAKE_CURRENT_BINARY_DIR}/${inst_file} - ${inst_targets} - ) + LIST(APPEND inst_targets ${CMAKE_CURRENT_BINARY_DIR}/${inst_file}) ENDFOREACH() # diff --git a/deal.II/contrib/cmake/macros/macro_to_string.cmake b/deal.II/contrib/cmake/macros/macro_to_string.cmake new file mode 100644 index 0000000000..df29ba02cd --- /dev/null +++ b/deal.II/contrib/cmake/macros/macro_to_string.cmake @@ -0,0 +1,7 @@ +MACRO(TO_STRING variable) + SET(variable_tmp ${${variable}}) + SET(${variable} "") + FOREACH(var ${variable_tmp}) + SET(${variable} "${${variable}} ${var}") + ENDFOREACH() +ENDMACRO() diff --git a/deal.II/doc/CMakeLists.txt b/deal.II/doc/CMakeLists.txt index 4ad86b27b7..3c7f9bfaff 100644 --- a/deal.II/doc/CMakeLists.txt +++ b/deal.II/doc/CMakeLists.txt @@ -5,6 +5,16 @@ IF(DEAL_II_WITH_DOXYGEN) + # + # Generate the documentation via doxygen: + # + ADD_SUBDIRECTORY(doxygen) + + + # + # Install the homepage: + # + IF(DEAL_II_INSTALL_COMPAT_FILES) # # The good, old directory where the documentation gets installed to: @@ -21,32 +31,18 @@ IF(DEAL_II_WITH_DOXYGEN) INSTALL(DIRECTORY . DESTINATION ${DEAL_II_DOCUMENTATION_RELDIR} COMPONENT documentation - FILES_MATCHING REGEX "^.*(html|css|136|eps|fig|png)$" # TODO! cmapx, dot + FILES_MATCHING REGEX "^.*(html|css|eps|fig|png)$" # TODO! cmapx, dot ) - SET(doc_files_to_configure - title.html.in - doxygen/tutorial/toc.html.in - doxygen/header.136.in - doxygen/header.tex.in - doxygen/options.dox.in - doxygen/Makefile.in - doxygen/options.136.in - doxygen/header.html.in + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/title.html.in + ${CMAKE_CURRENT_BINARY_DIR}/title.html + ) + INSTALL(FILES + ${CMAKE_CURRENT_BINARY_DIR}/title.html + DESTINATION ${DEAL_II_DOCUMENTATION_RELDIR} + COMPONENT documentation ) - - FOREACH(infile ${doc_files_to_configure}) - STRING(REGEX REPLACE "\\.in$" "" outfile "${infile}" ) - CONFIGURE_FILE( - ${CMAKE_CURRENT_SOURCE_DIR}/${infile} - ${CMAKE_CURRENT_BINARY_DIR}/${outfile} - ) - INSTALL(FILES - ${CMAKE_CURRENT_BINARY_DIR}/${outfile} - DESTINATION ${DEAL_II_DOCUMENTATION_RELDIR} - COMPONENT documentation - ) - ENDFOREACH() ENDIF(DEAL_II_WITH_DOXYGEN) diff --git a/deal.II/doc/doxygen/CMakeLists.txt b/deal.II/doc/doxygen/CMakeLists.txt new file mode 100644 index 0000000000..1c423725a2 --- /dev/null +++ b/deal.II/doc/doxygen/CMakeLists.txt @@ -0,0 +1,82 @@ +# +# TODO: +# +# A very primitive proof of concept on how to use doxygen, atm. +# +# +# doxygen/tutorial/toc.html.in +# doxygen/header.tex.in +# + +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/options.dox.in + ${CMAKE_CURRENT_BINARY_DIR}/options.dox + ) + +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/header.html.in + ${CMAKE_CURRENT_BINARY_DIR}/header.html + ) + +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/footer.html + ${CMAKE_CURRENT_BINARY_DIR}/footer.html + COPYONLY + ) + +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/filter + ${CMAKE_CURRENT_BINARY_DIR}/filter + COPYONLY + ) + + + +file(GLOB doxygen_input + ${CMAKE_SOURCE_DIR}/include/deal.II/* + ${CMAKE_BINARY_DIR}/include/deal.II/* + ${CMAKE_SOURCE_DIR}/doc/news/*.h + ${CMAKE_SOURCE_DIR}/contrib/parameter_gui/*.h + ${CMAKE_SOURCE_DIR}/contrib/parameter_gui/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/headers + ) +TO_STRING(doxygen_input) + + +file(GLOB doxygen_image_path + ${CMAKE_CURRENT_SOURCE_DIR}/images + ${CMAKE_SOURCE_DIR}/examples/*/doc + ${CMAKE_SOURCE_DIR}/contrib/parameter_gui/images + ) +TO_STRING(doxygen_image_path) + + +FILE(APPEND "${CMAKE_CURRENT_BINARY_DIR}/options.dox" + " + INPUT=${doxygen_input} + IMAGE_PATH=${doxygen_image_path} + " + ) + + +ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deal.II + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/deal.II + ) + + +ADD_CUSTOM_TARGET(doxygen ALL # TODO: Really all? + ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/options.dox + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/deal.II + ${CMAKE_CURRENT_BINARY_DIR}/options.dox + ${CMAKE_CURRENT_BINARY_DIR}/header.html + ${CMAKE_CURRENT_BINARY_DIR}/footer.html + ${CMAKE_CURRENT_BINARY_DIR}/filter + #${CMAKE_BINARY_DIR}/include/deal.II/base/config.h + #${CMAKE_BINARY_DIR}/include/deal.II/lac/lapack_templates.h + COMMENT "Generating documentation via doxygen" + VERBATIM + ) + diff --git a/deal.II/doc/doxygen/header.html.in b/deal.II/doc/doxygen/header.html.in index 30ee4d3a42..d09d6eb7b4 100644 --- a/deal.II/doc/doxygen/header.html.in +++ b/deal.II/doc/doxygen/header.html.in @@ -15,7 +15,7 @@ - + diff --git a/deal.II/doc/doxygen/header.tex.in b/deal.II/doc/doxygen/header.tex.in index a3ce1323fc..7666dea680 100644 --- a/deal.II/doc/doxygen/header.tex.in +++ b/deal.II/doc/doxygen/header.tex.in @@ -15,7 +15,7 @@ \begin{titlepage} \vspace*{7cm} \begin{center} -{\Large deal.II Reference Manual for Version @PACKAGE_VERSION@}\\ +{\Large deal.II Reference Manual for Version @DEAL_II_PACKAGE_VERSION@}\\ \vspace*{1cm} {\large Wolfgang Bangerth, Timo Heister, Guido Kanschat}\\ \vspace*{0.5cm} diff --git a/deal.II/doc/doxygen/options.dox.in b/deal.II/doc/doxygen/options.dox.in index 8b8c2235a6..ec29fb9cea 100644 --- a/deal.II/doc/doxygen/options.dox.in +++ b/deal.II/doc/doxygen/options.dox.in @@ -23,7 +23,7 @@ PROJECT_NAME = "The deal.II library" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = "Reference documentation for deal.II version @PACKAGE_VERSION@" +PROJECT_NUMBER = "Reference documentation for deal.II version @DEAL_II_PACKAGE_VERSION@" # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -105,7 +105,7 @@ FULL_PATH_NAMES = YES # If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = @prefix@ +STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ @CMAKE_BINARY_DIR@ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells @@ -477,7 +477,7 @@ EXCLUDE_PATTERNS = *.templates.h # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = @prefix@/examples/doxygen @prefix@/doc/doxygen/tutorial/plain +EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/examples/doxygen @CMAKE_SOURCE_DIR@/doc/doxygen/tutorial/plain # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp @@ -968,7 +968,7 @@ SEARCH_INCLUDES = YES # contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = @prefix@/include/deal.II +INCLUDE_PATH = @CMAKE_SOURCE_DIR@/include/deal.II # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the @@ -1089,7 +1089,7 @@ HIDE_UNDOC_RELATIONS = NO # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) -HAVE_DOT = @DEAL_II_HAVE_DOT@ +HAVE_DOT = YES # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and diff --git a/deal.II/doc/title.html.in b/deal.II/doc/title.html.in index b92faaab1c..9fce84ee7d 100644 --- a/deal.II/doc/title.html.in +++ b/deal.II/doc/title.html.in @@ -12,7 +12,7 @@
-

deal.II @PACKAGE_VERSION@ Documentation

+

deal.II @DEAL_II_PACKAGE_VERSION@ Documentation

-- 2.39.5