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