From 6f3566b574170125f51dff217543c28e8db8d3b4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 30 Apr 2018 22:48:29 -0600 Subject: [PATCH] When configuring the code-gallery, skip generated files. 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 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/doxygen/code-gallery/CMakeLists.txt b/doc/doxygen/code-gallery/CMakeLists.txt index 3008a91a86..361b20f288 100644 --- a/doc/doxygen/code-gallery/CMakeLists.txt +++ b/doc/doxygen/code-gallery/CMakeLists.txt @@ -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} -- 2.39.5