]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also install a code gallery page if not found during cmake time.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 6 Jan 2016 19:51:14 +0000 (13:51 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 11 Jan 2016 03:40:12 +0000 (21:40 -0600)
This makes sure that we always have a doxygen target to link to available. The target
page may simply say that the code gallery was not available.

doc/doxygen/CMakeLists.txt
doc/doxygen/DoxygenLayout.xml
doc/doxygen/code-gallery/CMakeLists.txt
doc/doxygen/code-gallery/no-code-gallery.h [new file with mode: 0644]

index 8814c586e83ec8d73c18b2dbcd0492d7ffaf3b7b..72ced2355fdf2f6fca06303f96a64e8235c29a38 100644 (file)
@@ -155,16 +155,21 @@ IF (EXISTS ${DEAL_II_CODE_GALLERY_DIRECTORY}/README.md)
     LIST(APPEND _doxygen_input
       ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/${_step}.h
       )
-    LIST(APPEND _doxygen_input
-      ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/code-gallery.h
-      )
   ENDFOREACH()
-
-  LIST(APPEND _doxygen_depend
-    ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/code-gallery.h
-    )
 ENDIF()
 
+
+# always make the doxygen run depend on the code-gallery.h file
+# (whether generated from the code gallery or copied from
+# no-code-gallery.h; both happen in code-gallery/CMakeLists.txt)
+LIST(APPEND _doxygen_input
+  ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/code-gallery.h
+)
+LIST(APPEND _doxygen_depend
+  ${CMAKE_CURRENT_BINARY_DIR}/code-gallery/code-gallery.h
+)
+
+
 TO_STRING(_doxygen_image_path_string ${_doxygen_image_path})
 TO_STRING(_doxygen_input_string ${_doxygen_input})
 
index edbe1696489057aa1ae42a6d3e84b730de2ce554..710a8f78b3ae0112982ffaba4f493d5e1418e62b 100644 (file)
@@ -3,7 +3,10 @@
   <!-- Navigation index tabs for HTML output -->
   <navindex>
     <tab type="mainpage" visible="yes" title=""/>
-    <tab type="user" visible="yes" title="Tutorial" url="@ref Tutorial" />
+    <tab type="usergroup" title="Tutorial">
+      <tab type="user" visible="yes" title="Tutorial" url="@ref Tutorial" />
+      <tab type="user" visible="yes" title="Code gallery" url="@ref CodeGallery" />
+    </tab>
     <tab type="modules" visible="yes" title="" intro=""/>
     <tab type="namespaces" visible="yes" title="">
       <tab type="namespacelist" visible="yes" title="" intro=""/>
index e98cae16c3b67453e05afc9566e5d4df214122a5..1df5147b5003a5035ecfc6545ce8687672076741 100644 (file)
@@ -126,6 +126,16 @@ IF (EXISTS ${DEAL_II_CODE_GALLERY_DIRECTORY}/README.md)
   ENDFOREACH()
 
 ELSE()
-  MESSAGE(STATUS "Generating the code-gallery documentation is only possible if the code gallery exists in ${DEAL_II_CODE_GALLERY_DIRECTORY}.")
+
+  # no copy of the code gallery is available. say so. but also
+  # install a file that creates a doxygen page we can link to
+  # nonetheless, so we don't get bad doxygen references
+  MESSAGE(STATUS "Setting up code gallery documentation.")
+  MESSAGE(STATUS "  Skipping as no code gallery exists in ${DEAL_II_CODE_GALLERY_DIRECTORY}.")
+
+  FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/no-code-gallery.h
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+  FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/no-code-gallery.h
+       ${CMAKE_CURRENT_BINARY_DIR}/code-gallery.h)
 ENDIF()
 
diff --git a/doc/doxygen/code-gallery/no-code-gallery.h b/doc/doxygen/code-gallery/no-code-gallery.h
new file mode 100644 (file)
index 0000000..4d93ccd
--- /dev/null
@@ -0,0 +1,27 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2016 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+/**
+ * @page CodeGallery The deal.II code gallery
+ *
+ * In order to create pages for the code gallery, there needs to be a
+ * version of the code gallery checked out alongside the other
+ * top-level directories in the <code>deal.II/</code> directory. No
+ * such copy was found when configuring your version of deal.II.
+ *
+ * Instructions for obtaining the code gallery can be found at
+ * http://dealii.org/code-gallery.html .
+ */

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.