From: Matthias Maier Date: Thu, 4 Apr 2013 09:38:25 +0000 (+0000) Subject: CMake: Define doxygen target with correct dependencies X-Git-Tag: v8.0.0~791 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33631377c571ca4fa4cc82716bccee0103aa3a7b;p=dealii.git CMake: Define doxygen target with correct dependencies git-svn-id: https://svn.dealii.org/trunk@29179 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/doxygen/CMakeLists.txt b/deal.II/doc/doxygen/CMakeLists.txt index fbb13e8f2c..5a59b6210d 100644 --- a/deal.II/doc/doxygen/CMakeLists.txt +++ b/deal.II/doc/doxygen/CMakeLists.txt @@ -12,10 +12,17 @@ ## ##### +# +# A glob. I'm sorry +# +file(GLOB DEAL_II_STEPS + ${CMAKE_SOURCE_DIR}/examples/step-* + ) + # # Prepare the example steps for doxygen: # -ADD_SUBDIRECTORY(tutorial) +ADD_SUBDIRECTORY(tutorial) # uses ${DEAL_II_STEPS} ADD_SUBDIRECTORY(images) # @@ -46,28 +53,36 @@ CONFIGURE_FILE( # # Finalize the doxygen configuration: # -file(GLOB doxygen_input - ${CMAKE_CURRENT_SOURCE_DIR}/headers - ${CMAKE_SOURCE_DIR}/contrib/parameter_gui - ${CMAKE_SOURCE_DIR}/doc/news - ${CMAKE_SOURCE_DIR}/include/deal.II/*/ - ${CMAKE_BINARY_DIR}/include/deal.II/*/ - ${CMAKE_CURRENT_BINARY_DIR}/tutorial +file(GLOB _doxygen_input + ${CMAKE_CURRENT_SOURCE_DIR}/headers/*.h + ${CMAKE_SOURCE_DIR}/contrib/parameter_gui/*.h + ${CMAKE_SOURCE_DIR}/contrib/parameter_gui/main.cpp + ${CMAKE_SOURCE_DIR}/doc/news/*.h + ${CMAKE_SOURCE_DIR}/include/deal.II/**/*.h + + ${CMAKE_BINARY_DIR}/include/deal.II/base/config.h ) -TO_STRING(doxygen_input_string ${doxygen_input}) +FOREACH(_step ${DEAL_II_STEPS}) + GET_FILENAME_COMPONENT(_step "${_step}" NAME) + LIST(APPEND _doxygen_input + ${CMAKE_CURRENT_BINARY_DIR}/tutorial/${_step}.h + ) +ENDFOREACH() +TO_STRING(_doxygen_input_string ${_doxygen_input}) -file(GLOB doxygen_image_path +file(GLOB _doxygen_image_path ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_SOURCE_DIR}/examples/*/doc ${CMAKE_SOURCE_DIR}/contrib/parameter_gui/images + ${CMAKE_CURRENT_BINARY_DIR}/images ) -TO_STRING(doxygen_image_path_string ${doxygen_image_path}) +TO_STRING(_doxygen_image_path_string ${_doxygen_image_path}) FILE(APPEND "${CMAKE_CURRENT_BINARY_DIR}/options.dox" " - INPUT=${doxygen_input_string} - IMAGE_PATH=${doxygen_image_path_string} + INPUT=${_doxygen_input_string} + IMAGE_PATH=${_doxygen_image_path_string} " ) @@ -85,7 +100,7 @@ ADD_CUSTOM_COMMAND( tutorial images ${CMAKE_CURRENT_BINARY_DIR}/options.dox - ${doxygen_input} + ${_doxygen_input} COMMENT "Generating documentation via doxygen (This may take a _really_ long time)" VERBATIM ) diff --git a/deal.II/doc/doxygen/tutorial/CMakeLists.txt b/deal.II/doc/doxygen/tutorial/CMakeLists.txt index c4905141ca..7a0050800c 100644 --- a/deal.II/doc/doxygen/tutorial/CMakeLists.txt +++ b/deal.II/doc/doxygen/tutorial/CMakeLists.txt @@ -16,20 +16,14 @@ # # Prepare steps.png and steps.cmapx: # - -file(GLOB _steps - ${CMAKE_SOURCE_DIR}/examples/step-* - ) - ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/steps.dot COMMAND ${PERL_EXECUTABLE} ARGS ${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/steps.pl - ${_steps} + ${DEAL_II_STEPS} > ${CMAKE_CURRENT_BINARY_DIR}/steps.dot ) - ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/steps.png @@ -47,13 +41,11 @@ ADD_CUSTOM_COMMAND( # # Prepare toc.html: # - CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/toc.html.in ${CMAKE_CURRENT_BINARY_DIR}/toc.html.in COPYONLY ) - ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/toc.html COMMAND ${PERL_EXECUTABLE} @@ -82,12 +74,10 @@ ADD_CUSTOM_TARGET(tutorial ${CMAKE_CURRENT_BINARY_DIR}/toc.html ) - # # Prepare the steps for documentation generation # - -FOREACH(_step ${_steps}) +FOREACH(_step ${DEAL_II_STEPS}) GET_FILENAME_COMPONENT(_step "${_step}" NAME) ADD_CUSTOM_COMMAND(