From: Wolfgang Bangerth Date: Tue, 2 Oct 2018 16:19:18 +0000 (-0600) Subject: Figure out the last copyright date for any of our source files. X-Git-Tag: v9.1.0-rc1~669^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bb8083184c057bf700ba6828b15751e3759fff5;p=dealii.git Figure out the last copyright date for any of our source files. --- diff --git a/doc/doxygen/CMakeLists.txt b/doc/doxygen/CMakeLists.txt index 50a1d3b7d0..84fec5cfc6 100644 --- a/doc/doxygen/CMakeLists.txt +++ b/doc/doxygen/CMakeLists.txt @@ -119,6 +119,26 @@ CONFIGURE_FILE( ) +# Figure out the last copyright date of any of the deal.II source +# files. We will use this then to set the copyright date of the +# doxygen-generated HTML files. +SET(_last_year "1997") +FILE(GLOB _source_files + "${CMAKE_SOURCE_DIR}/source/*/*.cc" + "${CMAKE_SOURCE_DIR}/include/deal.II/*/*.h" + "${CMAKE_SOURCE_DIR}/examples/*/*.cc") +FOREACH (_source ${_source_files}) + FILE(READ "${_source}" contents) + STRING(REGEX MATCH "Copyright .C. +([0-9]+ - )?([0-9]+)" _copyright ${contents}) + STRING(REGEX MATCH "[0-9]+\$" _year ${_copyright}) + + IF (_year GREATER _last_year) + SET (_last_year "${_year}") + ENDIF() +ENDFOREACH() +MESSAGE(STATUS "doxygen output will have copyright date ${_last_year}") + + # # Generate header, footer and style files for doxygen. #