File: ITKModuleDoxygen.cmake

package info (click to toggle)
insighttoolkit5 5.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 704,404 kB
  • sloc: cpp: 783,697; ansic: 628,724; xml: 44,704; fortran: 34,250; python: 22,874; sh: 4,078; pascal: 2,636; lisp: 2,158; makefile: 461; yacc: 328; asm: 205; perl: 203; lex: 146; tcl: 132; javascript: 98; csh: 81
file content (53 lines) | stat: -rw-r--r-- 1,774 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# this macro generates 2 files for a given module ${_name}
# ${_name}.dox file which contains the actual doxygen documentation
# ${_name}.dot file which defines the local dependency as graph
# which will be then processed by dot

macro(itk_module_doxygen _name)

  # _content defines the content of the ${_name}.dox file
  set(_content "/**\n")
  set(_content "${_content} \\defgroup ${_name} Module ${_name} \n")
  set(_content "${_content} ${ITK_MODULE_${_name}_DESCRIPTION} \n")

  set(_content "${_content} \\par Dependencies:\n")

  # _dotcontent defines the content of the ${_name}.dot
  set(_dotcontent "graph \"${_name}\" { \n")

  foreach(d ${ITK_MODULE_${_name}_DEPENDS})
    set(_content "${_content} \\li \\ref ${d} \n")
    set(_dotcontent "${_dotcontent} \"${_name}\" -- \"${d}\"; \n")
  endforeach()

  set(_dotcontent "${_dotcontent} }")

  # add the image that will be generated by dot based on the defined graph
  # here
  set(_content "${_content} \\dot \n")
  set(_content "${_content} ${_dotcontent} \n")
  set(_content "${_content} \\enddot \n")
  set(_content "${_content} */\n")

  if(ITK_SOURCE_DIR)
    configure_file("${ITK_SOURCE_DIR}/Utilities/Doxygen/Module.dox.in"
                   "${ITK_BINARY_DIR}/Utilities/Doxygen/Modules/${_name}.dox" @ONLY)
  endif()

  if(NOT ${_name}_THIRD_PARTY AND EXISTS ${${_name}_SOURCE_DIR}/include)
    if(Python3_EXECUTABLE
       AND BUILD_TESTING
       AND NOT DISABLE_MODULE_TESTS)
      itk_add_test(
        NAME
        ${_name}InDoxygenGroup
        COMMAND
        ${Python3_EXECUTABLE}
        "${ITK_CMAKE_DIR}/../Utilities/Doxygen/mcdoc.py"
        check
        ${_name}
        ${${_name}_SOURCE_DIR}/include)
      itk_memcheck_ignore(${_name}InDoxygenGroup)
    endif()
  endif()
endmacro()