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/vtk5.12.chm
132 #
133 set(COMPILE_HTML_HELP OFF)
134 set(RESULTING_HTML_HELP_FILE "${DOXTEMP}/vtk5.12.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 ON
144 # RESULTING_HTML_TARZ_ARCHIVE_FILE $DOXTEMP/vtk5.12-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 = vtk5-nightly.tag=http://www.vtk.org/doc/nightly/html
156 # or GENERATE_TAGFILE = "/builds/gitlab-kitware-sciviz-ci/build/Utilities/Doxygen/vtk5.12.tag")
157 # Example:
158 # DOWNLOAD_VTK_TAGFILE=OFF
159 # VTK_TAGFILE=vtk5-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/ClientServerStream"
213  "/builds/gitlab-kitware-sciviz-ci/Remoting/Core"
214  "/builds/gitlab-kitware-sciviz-ci/Remoting/Export"
215  "/builds/gitlab-kitware-sciviz-ci/Remoting/Import"
216  "/builds/gitlab-kitware-sciviz-ci/Remoting/Live"
217  "/builds/gitlab-kitware-sciviz-ci/Remoting/Misc"
218  "/builds/gitlab-kitware-sciviz-ci/Remoting/ServerManager"
219  "/builds/gitlab-kitware-sciviz-ci/Remoting/ServerManagerPython"
220  "/builds/gitlab-kitware-sciviz-ci/Remoting/Settings"
221  "/builds/gitlab-kitware-sciviz-ci/Remoting/Views"
222  "/builds/gitlab-kitware-sciviz-ci/Remoting/ViewsPython"
223  "/builds/gitlab-kitware-sciviz-ci/Web/Python"
224 
225 )
226 
227 # ----------------------------------------------------------------------------
228 # Print some progress. Be nice to the build watcher.
229 
230 macro(step n desc)
231  message(STATUS "")
232  message(STATUS "Building VTK docs: step ${n} of 13, (${desc})")
233  message(STATUS "----------------------------------------------------------------------------")
234 endmacro()
235 
236 macro(echo v)
237  message(STATUS "${v}='${${v}}'")
238 endmacro()
239 
240 # ----------------------------------------------------------------------------
241 # Values of this script's variables:
242 
243 message(STATUS "")
244 message(STATUS "Building VTK Documentation: initial variable values")
245 message(STATUS "----------------------------------------------------------------------------")
246 
247 foreach(var
248  CMAKE_CURRENT_LIST_FILE
249  CMAKE_MAJOR_VERSION
250  CMAKE_MINOR_VERSION
251  CMAKE_PATCH_VERSION
252  DOXYGEN
253  DOXYGEN_DOT_EXECUTABLE
254  HTML_HELP_COMPILER
255  PERL
256  PROJECT_NAME
257  PATH_TO_VTK_DOX_SCRIPTS
258  SOURCE_DIR
259  REL_PATH_TO_TOP
260  DOXTEMP
261  INTERMEDIATE_DOX_DIR
262  DATA_ROOT
263  GITWEB
264  GITWEB_SUFFIX
265  GITWEB_CHECKOUT
266  GITWEB_DATA
267  GITWEB_DATA_SUFFIX
268  GITWEB_DATA_CHECKOUT
269  DOXYFILE
270  OUTPUT_DIRECTORY
271  ALLOW_ERASE_OUTPUT_DIRECTORY
272  COMPILE_HTML_HELP
273  RESULTING_HTML_HELP_FILE
274  CREATE_HTML_TARZ_ARCHIVE
275  RESULTING_HTML_TARZ_ARCHIVE_FILE
276  DOWNLOAD_VTK_TAGFILE
277  VTK_TAGFILE
278  VTK_TAGFILE_REMOTE_DIR
279  VTK_TAGFILE_DEST_DIR
280  SOURCE_DIRECTORIES
281 )
282  echo(${var})
283 endforeach()
284 
285 # ----------------------------------------------------------------------------
286 # Convert the VTK headers to the Doxygen format.
287 
288 step(1 "convert VTK headers to doxygen format")
289 file(MAKE_DIRECTORY "${INTERMEDIATE_DOX_DIR}")
290 #execute_process(COMMAND ${PERL}
291 # "${PATH_TO_VTK_DOX_SCRIPTS}/doc_header2doxygen.pl"
292 # --to "${INTERMEDIATE_DOX_DIR}"
293 # --relativeto "${SOURCE_DIR}/${REL_PATH_TO_TOP}"
294 # ${SOURCE_DIRECTORIES}
295 # RESULT_VARIABLE rv
296 #)
297 #
298 #if (rv)
299 # message(FATAL_ERROR "Step failed: ${rv}")
300 #endif()
301 
302 # ----------------------------------------------------------------------------
303 # Build the Events invocation list.
304 
305 step(2 "cross-reference classes to InvokeEvent callers")
306 execute_process(COMMAND ${PERL}
307  "${PATH_TO_VTK_DOX_SCRIPTS}/doc_codematch.pl"
308  --codematch "\\w(?:->|\\.)InvokeEvent\\s*\\(\\s*(vtkCommand::\\w+)[\\s,]"
309  --label "Events"
310  --project "${PROJECT_NAME}"
311  --sectionmatch "^vtkCommand::(\\w)"
312  --store "doc_${PROJECT_NAME}_events.dox"
313  --title "Event to Classes"
314  --sectionmatch2 "^vtk(\\w)"
315  --store2 "doc_${PROJECT_NAME}_events2.dox"
316  --title2 "Class to Events"
317  --to "${INTERMEDIATE_DOX_DIR}"
318  --unique "v"
319  --relativeto "${SOURCE_DIR}/${REL_PATH_TO_TOP}"
320  ${SOURCE_DIRECTORIES}
321  RESULT_VARIABLE rv
322 )
323 
324 if (rv)
325  message(FATAL_ERROR "Step failed: ${rv}")
326 endif()
327 
328 # ----------------------------------------------------------------------------
329 # Build the full-text index.
330 
331 step(3 "build full text index -- skipping")
332 # execute_process(COMMAND ${PERL}
333 # "${PATH_TO_VTK_DOX_SCRIPTS}/doc_index.pl"
334 # --project "${PROJECT_NAME}"
335 # --stop "${PATH_TO_VTK_DOX_SCRIPTS}/doc_index.stop"
336 # --store "doc_${PROJECT_NAME}_index.dox"
337 # --to "${INTERMEDIATE_DOX_DIR}"
338 # ${SOURCE_DIRECTORIES}
339 # RESULT_VARIABLE rv
340 # )
341 #
342 # if (rv)
343 # message(FATAL_ERROR "Step failed: ${rv}")
344 # endif()
345 
346 # ----------------------------------------------------------------------------
347 # Extract the VTK version and create the main page.
348 # -- Here we differ from VTK, we simply install the generated
349 # doc_ParaView_version.dox file instead.
350 step(4 "extract ParaView version")
351 #file(INSTALL "${DOXTEMP}/doc_ParaView_version.dox"
352 # DESTINATION "${INTERMEDIATE_DOX_DIR}"
353 # USE_SOURCE_PERMISSIONS)
354 
355 # ----------------------------------------------------------------------------
356 # Generate the 'Class to Examples' page cross-linking each class to these
357 # examples that use that class.
358 
359 step(5 "cross-reference classes with Examples -- skipping")
360 #execute_process(COMMAND ${PERL}
361 # "${PATH_TO_VTK_DOX_SCRIPTS}/doc_class2example.pl"
362 # --baselinedir "${DATA_ROOT}/Baseline"
363 # --baselineicon "pic.gif"
364 # --baselinelink "${GITWEB_DATA_CHECKOUT}Baseline"
365 # --baselinelinksuffix "${GITWEB_DATA_SUFFIX}"
366 # --datamatch "\\W(VTK_DATA_ROOT|VTKData|(vtk)?GetDataRoot|ExpandDataFileName)\\W"
367 # --dataicon "paper-clip.gif"
368 # --dirmatch "^Examples$"
369 # --label "Examples"
370 # --link "${GITWEB_CHECKOUT}"
371 # --linksuffix "${GITWEB_SUFFIX}"
372 # --project "${PROJECT_NAME}"
373 # --store "doc_${PROJECT_NAME}_class2examples.dox"
374 # --title "Class To Examples"
375 # --to "${INTERMEDIATE_DOX_DIR}"
376 # --unique "e"
377 # --remove_leading_slash=1
378 # "${SOURCE_DIR}/${REL_PATH_TO_TOP}"
379 # RESULT_VARIABLE rv
380 #)
381 
382 # ----------------------------------------------------------------------------
383 # Generate the 'Class to Tests' page cross-linking each class to these
384 # tests that use that class.
385 
386 step(6 "cross-reference classes with Testing -- skipping")
387 #execute_process(COMMAND ${PERL}
388 # "${PATH_TO_VTK_DOX_SCRIPTS}/doc_class2example.pl"
389 # --baselinedir "${DATA_ROOT}/Baseline"
390 # --baselineicon "pic.gif"
391 # --baselinelink "${GITWEB_DATA_CHECKOUT}Baseline"
392 # --baselinelinksuffix "${GITWEB_DATA_SUFFIX}"
393 # --datamatch "\\W(VTK_DATA_ROOT|VTKData|(vtk)?GetDataRoot|ExpandDataFileName)\\W"
394 # --dataicon "paper-clip.gif"
395 # --dirmatch "^Testing$"
396 # --label "Tests"
397 # --link "${GITWEB_CHECKOUT}"
398 # --linksuffix "${GITWEB_SUFFIX}"
399 # --project "${PROJECT_NAME}"
400 # --store "doc_${PROJECT_NAME}_class2tests.dox"
401 # --title "Class To Tests"
402 # --to "${INTERMEDIATE_DOX_DIR}"
403 # --unique "t"
404 # --remove_leading_slash=1
405 # "${SOURCE_DIR}/${REL_PATH_TO_TOP}"
406 # RESULT_VARIABLE rv
407 #)
408 
409 # ----------------------------------------------------------------------------
410 # Retrieve the remote VTK tag file.
411 
412 step(7 "download VTK tag file")
413 if(DOWNLOAD_VTK_TAGFILE AND EXISTS "/usr/bin/gunzip")
414  if(NOT VTK_TAGFILE STREQUAL "")
415  file(DOWNLOAD
416  "${VTK_TAGFILE_REMOTE_DIR}/${VTK_TAGFILE}"
417  "${VTK_TAGFILE_DEST_DIR}/${VTK_TAGFILE}"
418  TIMEOUT 60
419  )
420  if(NOT EXISTS "${VTK_TAGFILE_DEST_DIR}/${VTK_TAGFILE}")
421  message(STATUS "warning: VTK tag file did not download correctly")
422  else()
423  message(STATUS "Download ${VTK_TAGFILE_DEST_DIR}/${VTK_TAGFILE}")
424  execute_process(COMMAND
425  "/usr/bin/gunzip" "${VTK_TAGFILE_DEST_DIR}/${VTK_TAGFILE}")
426  endif()
427  endif()
428 endif()
429 
430 # ----------------------------------------------------------------------------
431 # Create the Doxygen doc.
432 
433 step(8 "run doxygen")
434 file(REMOVE_RECURSE "${OUTPUT_DIRECTORY}")
435 file(MAKE_DIRECTORY "${OUTPUT_DIRECTORY}")
436 execute_process(COMMAND ${DOXYGEN} ${DOXYFILE}
437  RESULT_VARIABLE rv
438 )
439 if (rv)
440  message(FATAL_ERROR "Doxygen command failed: ${rv}")
441 endif()
442 
443 # ----------------------------------------------------------------------------
444 # Clean the HTML pages to remove the path to the intermediate Doxygen dir.
445 
446 step(9 "remove intermediate path from html")
447 execute_process(COMMAND ${PERL}
448  "${PATH_TO_VTK_DOX_SCRIPTS}/doc_rmpath.pl"
449  --to "${INTERMEDIATE_DOX_DIR}"
450  --html "${OUTPUT_DIRECTORY}/html"
451  RESULT_VARIABLE rv
452 )
453 
454 if (rv)
455  message(FATAL_ERROR "Step failed: ${rv}")
456 endif()
457 
458 # ----------------------------------------------------------------------------
459 # clean the HTML pages to remove layout problems
460 
461 step(10 "clean html to remove layout problems - skipping")
462 #execute_process(COMMAND ${PERL}
463 # "${PATH_TO_VTK_DOX_SCRIPTS}/doc_cleanhtml.pl"
464 # --html "${OUTPUT_DIRECTORY}/html"
465 # RESULT_VARIABLE rv
466 #)
467 #
468 #if (rv)
469 # message(FATAL_ERROR "Step failed: ${rv}")
470 #endif()
471 
472 # ----------------------------------------------------------------------------
473 # Create the *.chm file
474 
475 step(11 "build *.chm file")
476 if(COMPILE_HTML_HELP AND HTML_HELP_COMPILER)
477  if(NOT "${RESULTING_HTML_HELP_FILE}" STREQUAL "")
478  if(EXISTS "${OUTPUT_DIRECTORY}/html/index.hhp")
479  # hhc creates index.chm next to index.hhp
480  execute_process(COMMAND ${HTML_HELP_COMPILER} index.hhp
481  WORKING_DIRECTORY "${OUTPUT_DIRECTORY}/html"
482  RESULT_VARIABLE rv
483  )
484 
485  if (rv)
486  message(FATAL_ERROR "Command failed: ${rv}")
487  endif()
488  else()
489  message(STATUS "warning: no index.hhp file, not running HTML Help Compiler...")
490  endif()
491 
492  if(EXISTS "${OUTPUT_DIRECTORY}/html/index.chm")
493  # copy it to where we want it
494  execute_process(COMMAND ${CMAKE_COMMAND} -E copy
495  "${OUTPUT_DIRECTORY}/html/index.chm"
496  "${RESULTING_HTML_HELP_FILE}"
497  RESULT_VARIABLE rv
498  )
499 
500  # get rid of the one in the html dir
501  file(REMOVE "${OUTPUT_DIRECTORY}/html/index.chm")
502  else()
503  message(STATUS "warning: no index.chm file, not moving to final location...")
504  endif()
505  endif()
506 endif()
507 
508 # ----------------------------------------------------------------------------
509 # Create the *.tar.gz file
510 
511 if(CREATE_HTML_TARZ_ARCHIVE)
512  step(12 "build *.tar.gz file")
513  if(NOT RESULTING_HTML_TARZ_ARCHIVE_FILE STREQUAL "")
514  execute_process(COMMAND ${CMAKE_COMMAND} -E tar cfz ${RESULTING_HTML_TARZ_ARCHIVE_FILE} html
515  WORKING_DIRECTORY ${OUTPUT_DIRECTORY}
516  RESULT_VARIABLE rv
517  )
518 
519  if (rv)
520  message(FATAL_ERROR "Command failed: ${rv}")
521  endif()
522  endif()
523 else()
524  step(12 "build *.tar.gz file -- skipping")
525 endif()
526 
527 # ----------------------------------------------------------------------------
528 # Clean-up.
529 
530 if(DOXYGEN_KEEP_TEMP)
531  message("Skipping step 13: clean up.")
532 else()
533  step(13 "clean up")
534  file(REMOVE_RECURSE "${INTERMEDIATE_DOX_DIR}")
535 
536  if(DOWNLOAD_VTK_TAGFILE)
537  if(NOT VTK_TAGFILE STREQUAL "")
538  file(REMOVE "${VTK_TAGFILE_DEST_DIR}/${VTK_TAGFILE}")
539  endif()
540  endif()
541 
542  if(COMPILE_HTML_HELP)
543  if(NOT RESULTING_HTML_HELP_FILE STREQUAL "")
544  if(ALLOW_ERASE_OUTPUT_DIRECTORY)
545  file(REMOVE_RECURSE "${OUTPUT_DIRECTORY}")
546  endif()
547  endif()
548  endif()
549 endif()
550 
551 #
552 # If you add more steps, please update the step macro to reflect the total
553 # number of steps in the progressive build output... Thanks.
554 #