]> https://gitweb.dealii.org/ - dealii.git/commitdiff
When configuring the code-gallery, skip generated files. 6410/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 1 May 2018 04:48:29 +0000 (22:48 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 1 May 2018 04:48:29 +0000 (22:48 -0600)
People run 'cmake' in their code-gallery directories and may then want to
create documentation for these directories later. The generated files greatly
confuse doxygen, so (appropriately) filter them out.

doc/doxygen/code-gallery/CMakeLists.txt

index 3008a91a86e0555866a8b29ffa58440378e0a17a..361b20f2880c9ba8175b496bef571b7eb0d02eb8 100644 (file)
@@ -96,6 +96,25 @@ IF (EXISTS ${DEAL_II_CODE_GALLERY_DIRECTORY}/README.md)
     LIST(REMOVE_ITEM _relative_src_files doc/dependencies)
     LIST(REMOVE_ITEM _relative_src_files doc/builds-on)
 
+
+    # Also remove files that were created by running 'cmake' in the
+    # code-gallery directory. These greatly confuse doxygen when we
+    # run them through doxygen.
+    #
+    # We would really like to also exclude executables, but there is
+    # no option to cmake's 'IF' command to test for that :-(
+    FOREACH(_file ${_relative_src_files})
+      IF(IS_DIRECTORY ${_file}
+         OR
+         ${_file} MATCHES "CMakeFiles/.*"
+         OR
+         ${_file} MATCHES "CMakeCache.txt")
+        LIST(REMOVE_ITEM _relative_src_files ${_file})
+      ENDIF()
+    ENDFOREACH()
+
+    MESSAGE(STATUS "    Setting up ${_relative_src_files}")
+
     ADD_CUSTOM_COMMAND(
       OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_step}.h
       COMMAND ${PERL_EXECUTABLE}

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.