doc_makeall.cmake
Go to the documentation of this file.
1 # -------------------------------------------------------------------------
2 # Doxygen documentation batch
3 # -------------------------------------------------------------------------
4 
5 set(DOXYGEN "/builds/gitlab-kitware-sciviz-ci/.gitlab/doxygen/bin/doxygen")
6 set(DOXYGEN_DOT_EXECUTABLE "/usr/bin/dot")
7 set(HTML_HELP_COMPILER "")
8 set(PERL "/usr/bin/perl")
9 set(DOXYGEN_KEEP_TEMP "")
10 
11 if(NOT DOXYGEN)
12  message(FATAL_ERROR "error: cannot build ParaView documentation without doxygen")
13 endif()
14 if(NOT DOXYGEN_DOT_EXECUTABLE)
15  message(FATAL_ERROR "error: cannot build ParaView documentation without dot")
16 endif()
17 if(NOT PERL)
18  message(FATAL_ERROR "error: cannot build ParaView documentation without perl")
19 endif()
20 
21 # PROJECT_NAME:
22 # Documentation/project name. Used in some of the resulting file names and
23 # xrefs to uniquify two or more projects linked together through their
24 # Doxygen's tag files. Mandatory for each documentation set.
25 # Note: might be the same as the doxyfile's PROJECT_NAME
26 # Example:
27 # PROJECT_NAME=ParaView
28 #
29 set (PROJECT_NAME ParaView)
30 
31 # PATH_TO_VTK_DOX_SCRIPTS:
32 # Path to the directory holding the Perl scripts used to produce the VTK doc
33 # in Doxygen format. You need the VTK source files or a local copy of
34 # these scripts.
35 # Example:
36 # PATH_TO_VTK_DOX_SCRIPTS=/builds/gitlab-kitware-sciviz-ci/Utilities/Doxygen
37 #
38 set(PATH_TO_VTK_DOX_SCRIPTS "/builds/gitlab-kitware-sciviz-ci/VTK/Utilities/Doxygen")
39 set(PATH_TO_PARAVIEW_DOX_SCRIPTS "/builds/gitlab-kitware-sciviz-ci/Utilities/Doxygen")
40 
41 # SOURCE_DIR:
42 # Source directory. The top directory of the source files.
43 # Example:
44 # SOURCE_DIR=/builds/gitlab-kitware-sciviz-ci
45 #
46 set(SOURCE_DIR "/builds/gitlab-kitware-sciviz-ci")
47 
48 # REL_PATH_TO_TOP:
49 # Relative path from the top directory of the source files to the directory
50 # (or top directory) holding the files to document. Useful if several parts
51 # of the same source directory should be documented separately.
52 # Example:
53 # REL_PATH_TO_TOP=.
54 # REL_PATH_TO_TOP=framework/src
55 set(REL_PATH_TO_TOP .)
56 
57 # INTERMEDIATE_DOX_DIR:
58 # Directory where the intermediate Doxygen files should be stored (mainly
59 # these headers files converted from the VTK format to the Doxygen format).
60 # This directory is erased at the end of this script, unless you comment
61 # the corresponding line.
62 # DOXTEMP might be used to simplify the syntax.
63 # Example:
64 # DOXTEMP=DOXTEMP=/builds/gitlab-kitware-sciviz-ci/build/Utilities/Doxygen
65 # INTERMEDIATE_DOX_DIR=$DOXTEMP/dox
66 #
67 set(DOXTEMP "/builds/gitlab-kitware-sciviz-ci/build/Utilities/Doxygen")
68 set(INTERMEDIATE_DOX_DIR "${DOXTEMP}/dox")
69 
70 # DATA_ROOT:
71 # Data directory. The root directory of the data files.
72 # Example:
73 # DATA_ROOT=
74 #
75 set(DATA_ROOT "")
76 
77 # GITWEB, GITWEB_SUFFIX, GITWEB_CHECKOUT,
78 # GITWEB_DATA, GITWEB_DATA_SUFFIX, GITWEB_DATA_CHECKOUT:
79 # URL to the GITWeb of the project + same in checkout mode (i.e. appending a
80 # file name to this URL will retrieve the contents of the file). In the same way
81 # GITWEB_SUFFIX will be appended to the result.
82 # Same applies to GITWEB_DATA, which is the URL to the GITWeb
83 # of the Data's project.
84 # Example:
85 # GITWEB=http://public.kitware.com/cgi-bin/viewcvs.cgi
86 # GITWEB_SUFFIX=?root=VTK
87 # GITWEB_CHECKOUT=http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*
88 # GITWEB_DATA=http://public.kitware.com/cgi-bin/viewcvs.cgi
89 # GITWEB_DATA_SUFFIX=?root=VTKData
90 # GITWEB_DATA_CHECKOUT=http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*
91 #
92 set(GITWEB http://paraview.org/gitweb) # not used
93 set(GITWEB_SUFFIX ) #empty for git ?p=VTK)
94 set(GITWEB_CHECKOUT http://paraview.org/gitweb?p=ParaView.git;a=blob;f=)
95 set(GITWEB_DATA http://paraview.org/gitweb)
96 set(GITWEB_DATA_SUFFIX ) # empty for git ?p=VTKData)
97 set(GITWEB_DATA_CHECKOUT http://paraview.org/gitweb?p=ParaViewData.git;a=blob;f=)
98 
99 # DOXYFILE:
100 # Path to the Doxygen configuration file (i.e. doxyfile).
101 # Example:
102 # DOXYFILE $DOXTEMP/doxyfile
103 #
104 set(DOXYFILE "${DOXTEMP}/doxyfile")
105 
106 # OUTPUT_DIRECTORY ALLOW_ERASE_OUTPUT_DIRECTORY:
107 # Path to the Doxygen output directory (where the resulting doc is stored).
108 # Note: should be the same as your doxyfile's OUTPUT_DIRECTORY
109 # If ON, allows the output directory to be erased when some advanced output
110 # file have been produced (HTML Help, or TAR archive for example).
111 # Example:
112 # OUTPUT_DIRECTORY $DOXTEMP/doc
113 # ALLOW_ERASE_OUTPUT_DIRECTORY ON
114 #
115 set(OUTPUT_DIRECTORY "${DOXTEMP}/doc")
116 set(ALLOW_ERASE_OUTPUT_DIRECTORY ON)
117 
118 # COMPILE_HTML_HELP RESULTING_HTML_HELP_FILE:
119 # Compile the CHM (Compressed HTML) HTML Help file, name of the resulting
120 # file. If set to ON and name is non-empty these options will actually
121 # trigger the HTML-Help compiler to create the CHM. The resulting
122 # file (usually index.chm) will be renamed to this name.
123 # Note: if ON, the whole $OUTPUT_DIRECTORY will be erased at the end of
124 # this script, since this file is considered to be one of the
125 # advanced final output, unless ALLOW_ERASE_OUTPUT_DIRECTORY is OFF
126 # Note: your doxyfile should be configured to enable HTML Help creation
127 # (using GENERATE_HTML YES, GENERATE_HTMLHELP YES)
128 # Example:
129 # COMPILE_HTML_HELP ON
130 # COMPILE_HTML_HELP
131 # RESULTING_HTML_HELP_FILE $DOXTEMP/vtk6.0.chm
132 #
133 set(COMPILE_HTML_HELP OFF)
134 set(RESULTING_HTML_HELP_FILE "${DOXTEMP}/vtk6.0.chm")
135 
136 # CREATE_HTML_TARZ_ARCHIVE RESULTING_HTML_TARZ_ARCHIVE_FILE:
137 # Create a compressed (gzip) tar archive of the html directory (located
138 # under the OUTPUT_DIRECTORY), and name of the resulting archive file.
139 # Note: your doxyfile should be configured to enable HTML creation
140 # (using GENERATE_HTML YES)
141 # Example:
142 # CREATE_HTML_TARZ_ARCHIVE ON
143 # CREATE_HTML_TARZ_ARCHIVE
144 # RESULTING_HTML_TARZ_ARCHIVE_FILE $DOXTEMP/vtk6.0-html.tar.gz
145 #
146 set(CREATE_HTML_TARZ_ARCHIVE OFF)
147 set(RESULTING_HTML_TARZ_ARCHIVE_FILE "${DOXTEMP}/ParaView-html.tar.gz")
148 
149 # DOWNLOAD_VTK_TAGFILE VTK_TAGFILE VTK_TAGFILE_REMOTE_DIR VTK_TAGFILE_DEST_DIR:
150 # Download the VTK tag file, name, remote location and destination dir of this
151 # tag file. If set to ON, the tag file is retrieved from its remote location
152 # using wget and stored in the destination dir. It will be automatically
153 # deleted at the end of this script.
154 # Note: your doxyfile must be tailored to make use-of or create this tag file.
155 # (using TAGFILES = vtk6-nightly.tag=http://www.vtk.org/doc/nightly/html
156 # or GENERATE_TAGFILE = "/builds/gitlab-kitware-sciviz-ci/build/Utilities/Doxygen/vtk6.0.tag")
157 # Example:
158 # DOWNLOAD_VTK_TAGFILE=OFF
159 # VTK_TAGFILE=vtk6-nightly.tag
160 # VTK_TAGFILE_REMOTE_DIR=http://www.vtk.org/doc/nightly/html
161 # VTK_TAGFILE_DEST_DIR=$DOXTEMP
162 #
163 set(DOWNLOAD_VTK_TAGFILE ON)
164 set(VTK_TAGFILE vtkNightlyDoc.tag.gz)
165 set(VTK_TAGFILE_REMOTE_DIR http://www.vtk.org/files/nightly)
166 set(VTK_TAGFILE_DEST_DIR "${DOXTEMP}")
167 
168 # ----------------------------------------------------------------------------
169 # SOURCE_DIRECTORIES
170 #
171 # This list is processed by several perl scripts below. Keeping it in one
172 # list avoids the possibility that multiple lists might get out of sync with
173 # rushed edits...
174 #
175 set(SOURCE_DIRECTORIES
176  "/builds/gitlab-kitware-sciviz-ci/Adaptors/CTH"
177  "/builds/gitlab-kitware-sciviz-ci/Adaptors/Cam/Python"
178  "/builds/gitlab-kitware-sciviz-ci/Adaptors/Cam"
179  "/builds/gitlab-kitware-sciviz-ci/Adaptors/CatalystTestDriver"
180  "/builds/gitlab-kitware-sciviz-ci/Adaptors/NPIC"
181  "/builds/gitlab-kitware-sciviz-ci/Adaptors/Pagosa"
182  "/builds/gitlab-kitware-sciviz-ci/Adaptors/Particle"
183  "/builds/gitlab-kitware-sciviz-ci/Adaptors/Phasta"
184  "/builds/gitlab-kitware-sciviz-ci/Adaptors/Python"
185  "/builds/gitlab-kitware-sciviz-ci/Clients/Catalyst"
186  "/builds/gitlab-kitware-sciviz-ci/Clients/InSitu"
187  "/builds/gitlab-kitware-sciviz-ci/Clients/PythonCatalyst"
188  "/builds/gitlab-kitware-sciviz-ci/Clients/Web"
189  "/builds/gitlab-kitware-sciviz-ci/Examples/CustomApplications/SimpleParaView/plugins/SimpleParaViewCustomFilters/ElevationFiltersApp"
190  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/ComplexPluginArchitecture/ComplexModuleArchitecture/Core"
191  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/ComplexPluginArchitecture/ComplexModuleArchitecture/Filters"
192  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/ComplexPluginArchitecture/Shared"
193  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/DockWidgetCustomProxy/Plugin/Writer"
194  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/ElevationFilter/Plugin/ElevationFilters"
195  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/LagrangianIntegrationModel/Plugin/LagrangianExample"
196  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/LiveSource/Plugin/EmulatedTimeDummySources"
197  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/LiveSource/Plugin/LiveSourceDummySources"
198  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/RegistrationName/Plugin/ElevationFilters"
199  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/RegistrationName/Plugin/MyReader"
200  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/Representation/Plugin/GeometryRepresentations"
201  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/SMMyProxy/Plugin/MyProxy"
202  "/builds/gitlab-kitware-sciviz-ci/Examples/Plugins/ServerSideQt/Plugin/SphereSource"
203  "/builds/gitlab-kitware-sciviz-ci/Incubator/CAVEInteractionStyles"
204  "/builds/gitlab-kitware-sciviz-ci/Incubator/Core"
205  "/builds/gitlab-kitware-sciviz-ci/Qt/ApplicationComponents"
206  "/builds/gitlab-kitware-sciviz-ci/Qt/Components"
207  "/builds/gitlab-kitware-sciviz-ci/Qt/Core"
208  "/builds/gitlab-kitware-sciviz-ci/Qt/Python"
209  "/builds/gitlab-kitware-sciviz-ci/Qt/Widgets"
210  "/builds/gitlab-kitware-sciviz-ci/Remoting/Animation"
211  "/builds/gitlab-kitware-sciviz-ci/Remoting/Application"
212  "/builds/gitlab-kitware-sciviz-ci/Remoting/ApplicationComponents"
213  "/builds/gitlab-kitware-sciviz-ci/Remoting/ClientServerStream"
214  "/builds/gitlab-kitware-sciviz-ci/Remoting/Core"
215  "/builds/gitlab-kitware-sciviz-ci/Remoting/Export"
216  "/builds/gitlab-kitware-sciviz-ci/Remoting/Import"
217  "/builds/gitlab-kitware-sciviz-ci/Remoting/Live"
218  "/builds/gitlab-kitware-sciviz-ci/Remoting/Misc"
219  "/builds/gitlab-kitware-sciviz-ci/Remoting/ServerManager"
220  "/builds/gitlab-kitware-sciviz-ci/Remoting/ServerManagerPython"
221  "/builds/gitlab-kitware-sciviz-ci/Remoting/Settings"
222  "/builds/gitlab-kitware-sciviz-ci/Remoting/Views"
223  "/builds/gitlab-kitware-sciviz-ci/Remoting/ViewsPython"
224  "/builds/gitlab-kitware-sciviz-ci/Web/Python"
225 
226 )
227 
228 # ----------------------------------------------------------------------------
229 # Print some progress. Be nice to the build watcher.
230 
231 macro(step n desc)
232  message(STATUS "")
233  message(STATUS "Building VTK docs: step ${n} of 13, (${desc})")
234  message(STATUS "----------------------------------------------------------------------------")
235 endmacro()
236 
237 macro(echo v)
238  message(STATUS "${v}='${${v}}'")
239 endmacro()
240 
241 # ----------------------------------------------------------------------------
242 # Values of this script's variables:
243 
244 message(STATUS "")
245 message(STATUS "Building VTK Documentation: initial variable values")
246 message(STATUS "----------------------------------------------------------------------------")
247 
248 foreach(var
249  CMAKE_CURRENT_LIST_FILE
250  CMAKE_MAJOR_VERSION
251  CMAKE_MINOR_VERSION
252  CMAKE_PATCH_VERSION
253  DOXYGEN
254  DOXYGEN_DOT_EXECUTABLE
255  HTML_HELP_COMPILER
256  PERL
257  PROJECT_NAME
258  PATH_TO_VTK_DOX_SCRIPTS
259  SOURCE_DIR
260  REL_PATH_TO_TOP
261  DOXTEMP
262  INTERMEDIATE_DOX_DIR
263  DATA_ROOT
264  GITWEB
265  GITWEB_SUFFIX
266  GITWEB_CHECKOUT
267  GITWEB_DATA
268  GITWEB_DATA_SUFFIX
269  GITWEB_DATA_CHECKOUT
270  DOXYFILE
271  OUTPUT_DIRECTORY
272  ALLOW_ERASE_OUTPUT_DIRECTORY
273  COMPILE_HTML_HELP
274  RESULTING_HTML_HELP_FILE
275  CREATE_HTML_TARZ_ARCHIVE
276  RESULTING_HTML_TARZ_ARCHIVE_FILE
277  DOWNLOAD_VTK_TAGFILE
278  VTK_TAGFILE
279  VTK_TAGFILE_REMOTE_DIR
280  VTK_TAGFILE_DEST_DIR
281  SOURCE_DIRECTORIES
282 )
283  echo(${var})
284 endforeach()
285 
286 # ----------------------------------------------------------------------------
287 # Convert the VTK headers to the Doxygen format.
288 
289 step(1 "convert VTK headers to doxygen format")
290 file(MAKE_DIRECTORY "${INTERMEDIATE_DOX_DIR}")
291 #execute_process(COMMAND ${PERL}
292 # "${PATH_TO_VTK_DOX_SCRIPTS}/doc_header2doxygen.pl"
293 # --to "${INTERMEDIATE_DOX_DIR}"
294 # --relativeto "${SOURCE_DIR}/${REL_PATH_TO_TOP}"
295 # ${SOURCE_DIRECTORIES}
296 # RESULT_VARIABLE rv
297 #)
298 #
299 #if (rv)
300 # message(FATAL_ERROR "Step failed: ${rv}")
301 #endif()
302 
303 # ----------------------------------------------------------------------------
304 # Build the Events invocation list.
305 
306 step(2 "cross-reference classes to InvokeEvent callers")
307 execute_process(COMMAND ${PERL}
308  "${PATH_TO_VTK_DOX_SCRIPTS}/doc_codematch.pl"
309  --codematch "\\w(?:->|\\.)InvokeEvent\\s*\\(\\s*(vtkCommand::\\w+)[\\s,]"
310  --label "Events"
311  --project "${PROJECT_NAME}"
312  --sectionmatch "^vtkCommand::(\\w)"
313  --store "doc_${PROJECT_NAME}_events.dox"
314  --title "Event to Classes"
315  --sectionmatch2 "^vtk(\\w)"
316  --store2 "doc_${PROJECT_NAME}_events2.dox"
317  --title2 "Class to Events"
318  --to "${INTERMEDIATE_DOX_DIR}"
319  --unique "v"
320  --relativeto "${SOURCE_DIR}/${REL_PATH_TO_TOP}"
321  ${SOURCE_DIRECTORIES}
322  RESULT_VARIABLE rv
323 )
324 
325 if (rv)
326  message(FATAL_ERROR "Step failed: ${rv}")
327 endif()
328 
329 # ----------------------------------------------------------------------------
330 # Build the full-text index.
331 
332 step(3 "build full text index -- skipping")
333 # execute_process(COMMAND ${PERL}
334 # "${PATH_TO_VTK_DOX_SCRIPTS}/doc_index.pl"
335 # --project "${PROJECT_NAME}"
336 # --stop "${PATH_TO_VTK_DOX_SCRIPTS}/doc_index.stop"
337 # --store "doc_${PROJECT_NAME}_index.dox"
338 # --to "${INTERMEDIATE_DOX_DIR}"
339 # ${SOURCE_DIRECTORIES}
340 # RESULT_VARIABLE rv
341 # )
342 #
343 # if (rv)
344 # message(FATAL_ERROR "Step failed: ${rv}")
345 # endif()
346 
347 # ----------------------------------------------------------------------------
348 # Extract the VTK version and create the main page.
349 # -- Here we differ from VTK, we simply install the generated
350 # doc_ParaView_version.dox file instead.
351 step(4 "extract ParaView version")
352 #file(INSTALL "${DOXTEMP}/doc_ParaView_version.dox"
353 # DESTINATION "${INTERMEDIATE_DOX_DIR}"
354 # USE_SOURCE_PERMISSIONS)
355 
356 # ----------------------------------------------------------------------------
357 # Generate the 'Class to Examples' page cross-linking each class to these
358 # examples that use that class.
359 
360 step(5 "cross-reference classes with Examples -- skipping")
361 #execute_process(COMMAND ${PERL}
362 # "${PATH_TO_VTK_DOX_SCRIPTS}/doc_class2example.pl"
363 # --baselinedir "${DATA_ROOT}/Baseline"
364 # --baselineicon "pic.gif"
365 # --baselinelink "${GITWEB_DATA_CHECKOUT}Baseline"
366 # --baselinelinksuffix "${GITWEB_DATA_SUFFIX}"
367 # --datamatch "\\W(VTK_DATA_ROOT|VTKData|(vtk)?GetDataRoot|ExpandDataFileName)\\W"
368 # --dataicon "paper-clip.gif"
369 # --dirmatch "^Examples$"
370 # --label "Examples"
371 # --link "${GITWEB_CHECKOUT}"
372 # --linksuffix "${GITWEB_SUFFIX}"
373 # --project "${PROJECT_NAME}"
374 # --store "doc_${PROJECT_NAME}_class2examples.dox"
375 # --title "Class To Examples"
376 # --to "${INTERMEDIATE_DOX_DIR}"
377 # --unique "e"
378 # --remove_leading_slash=1
379 # "${SOURCE_DIR}/${REL_PATH_TO_TOP}"
380 # RESULT_VARIABLE rv
381 #)
382 
383 # ----------------------------------------------------------------------------
384 # Generate the 'Class to Tests' page cross-linking each class to these
385 # tests that use that class.
386 
387 step(6 "cross-reference classes with Testing -- skipping")
388 #execute_process(COMMAND ${PERL}
389 # "${PATH_TO_VTK_DOX_SCRIPTS}/doc_class2example.pl"
390 # --baselinedir "${DATA_ROOT}/Baseline"
391 # --baselineicon "pic.gif"
392 # --baselinelink "${GITWEB_DATA_CHECKOUT}Baseline"
393 # --baselinelinksuffix "${GITWEB_DATA_SUFFIX}"
394 # --datamatch "\\W(VTK_DATA_ROOT|VTKData|(vtk)?GetDataRoot|ExpandDataFileName)\\W"
395 # --dataicon "paper-clip.gif"
396 # --dirmatch "^Testing$"
397 # --label "Tests"
398 # --link "${GITWEB_CHECKOUT}"
399 # --linksuffix "${GITWEB_SUFFIX}"
400 # --project "${PROJECT_NAME}"
401 # --store "doc_${PROJECT_NAME}_class2tests.dox"
402 # --title "Class To Tests"
403 # --to "${INTERMEDIATE_DOX_DIR}"
404 # --unique "t"
405 # --remove_leading_slash=1
406 # "${SOURCE_DIR}/${REL_PATH_TO_TOP}"
407 # RESULT_VARIABLE rv
408 #)
409 
410 # ----------------------------------------------------------------------------
411 # Retrieve the remote VTK tag file.
412 
413 step(7 "download VTK tag file")
414 if(DOWNLOAD_VTK_TAGFILE AND EXISTS "/usr/bin/gunzip")
415  if(NOT VTK_TAGFILE STREQUAL "")
416  file(DOWNLOAD
417  "${VTK_TAGFILE_REMOTE_DIR}/${VTK_TAGFILE}"
418  "${VTK_TAGFILE_DEST_DIR}/${VTK_TAGFILE}"
419  TIMEOUT 60
420  )
421  if(NOT EXISTS "${VTK_TAGFILE_DEST_DIR}/${VTK_TAGFILE}")
422  message(STATUS "warning: VTK tag file did not download correctly")
423  else()
424  message(STATUS "Download ${VTK_TAGFILE_DEST_DIR}/${VTK_TAGFILE}")
425  execute_process(COMMAND
426  "/usr/bin/gunzip" "${VTK_TAGFILE_DEST_DIR}/${VTK_TAGFILE}")
427  endif()
428  endif()
429 endif()
430 
431 # ----------------------------------------------------------------------------
432 # Create the Doxygen doc.
433 
434 step(8 "run doxygen")
435 file(REMOVE_RECURSE "${OUTPUT_DIRECTORY}")
436 file(MAKE_DIRECTORY "${OUTPUT_DIRECTORY}")
437 execute_process(COMMAND ${DOXYGEN} ${DOXYFILE}
438  RESULT_VARIABLE rv
439 )
440 if (rv)
441  message(FATAL_ERROR "Doxygen command failed: ${rv}")
442 endif()
443 
444 # ----------------------------------------------------------------------------
445 # Clean the HTML pages to remove the path to the intermediate Doxygen dir.
446 
447 step(9 "remove intermediate path from html")
448 execute_process(COMMAND ${PERL}
449  "${PATH_TO_VTK_DOX_SCRIPTS}/doc_rmpath.pl"
450  --to "${INTERMEDIATE_DOX_DIR}"
451  --html "${OUTPUT_DIRECTORY}/html"
452  RESULT_VARIABLE rv
453 )
454 
455 if (rv)
456  message(FATAL_ERROR "Step failed: ${rv}")
457 endif()
458 
459 # ----------------------------------------------------------------------------
460 # clean the HTML pages to remove layout problems
461 
462 step(10 "clean html to remove layout problems - skipping")
463 #execute_process(COMMAND ${PERL}
464 # "${PATH_TO_VTK_DOX_SCRIPTS}/doc_cleanhtml.pl"
465 # --html "${OUTPUT_DIRECTORY}/html"
466 # RESULT_VARIABLE rv
467 #)
468 #
469 #if (rv)
470 # message(FATAL_ERROR "Step failed: ${rv}")
471 #endif()
472 
473 # ----------------------------------------------------------------------------
474 # Create the *.chm file
475 
476 step(11 "build *.chm file")
477 if(COMPILE_HTML_HELP AND HTML_HELP_COMPILER)
478  if(NOT "${RESULTING_HTML_HELP_FILE}" STREQUAL "")
479  if(EXISTS "${OUTPUT_DIRECTORY}/html/index.hhp")
480  # hhc creates index.chm next to index.hhp
481  execute_process(COMMAND ${HTML_HELP_COMPILER} index.hhp
482  WORKING_DIRECTORY "${OUTPUT_DIRECTORY}/html"
483  RESULT_VARIABLE rv
484  )
485 
486  if (rv)
487  message(FATAL_ERROR "Command failed: ${rv}")
488  endif()
489  else()
490  message(STATUS "warning: no index.hhp file, not running HTML Help Compiler...")
491  endif()
492 
493  if(EXISTS "${OUTPUT_DIRECTORY}/html/index.chm")
494  # copy it to where we want it
495  execute_process(COMMAND ${CMAKE_COMMAND} -E copy
496  "${OUTPUT_DIRECTORY}/html/index.chm"
497  "${RESULTING_HTML_HELP_FILE}"
498  RESULT_VARIABLE rv
499  )
500 
501  # get rid of the one in the html dir
502  file(REMOVE "${OUTPUT_DIRECTORY}/html/index.chm")
503  else()
504  message(STATUS "warning: no index.chm file, not moving to final location...")
505  endif()
506  endif()
507 endif()
508 
509 # ----------------------------------------------------------------------------
510 # Create the *.tar.gz file
511 
512 if(CREATE_HTML_TARZ_ARCHIVE)
513  step(12 "build *.tar.gz file")
514  if(NOT RESULTING_HTML_TARZ_ARCHIVE_FILE STREQUAL "")
515  execute_process(COMMAND ${CMAKE_COMMAND} -E tar cfz ${RESULTING_HTML_TARZ_ARCHIVE_FILE} html
516  WORKING_DIRECTORY ${OUTPUT_DIRECTORY}
517  RESULT_VARIABLE rv
518  )
519 
520  if (rv)
521  message(FATAL_ERROR "Command failed: ${rv}")
522  endif()
523  endif()
524 else()
525  step(12 "build *.tar.gz file -- skipping")
526 endif()
527 
528 # ----------------------------------------------------------------------------
529 # Clean-up.
530 
531 if(DOXYGEN_KEEP_TEMP)
532  message("Skipping step 13: clean up.")
533 else()
534  step(13 "clean up")
535  file(REMOVE_RECURSE "${INTERMEDIATE_DOX_DIR}")
536 
537  if(DOWNLOAD_VTK_TAGFILE)
538  if(NOT VTK_TAGFILE STREQUAL "")
539  file(REMOVE "${VTK_TAGFILE_DEST_DIR}/${VTK_TAGFILE}")
540  endif()
541  endif()
542 
543  if(COMPILE_HTML_HELP)
544  if(NOT RESULTING_HTML_HELP_FILE STREQUAL "")
545  if(ALLOW_ERASE_OUTPUT_DIRECTORY)
546  file(REMOVE_RECURSE "${OUTPUT_DIRECTORY}")
547  endif()
548  endif()
549  endif()
550 endif()
551 
552 #
553 # If you add more steps, please update the step macro to reflect the total
554 # number of steps in the progressive build output... Thanks.
555 #