CMakeGraphVizOptions.cmake 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. #[=======================================================================[.rst:
  4. CMakeGraphVizOptions
  5. --------------------
  6. The builtin graphviz support of CMake.
  7. Variables specific to the graphviz support
  8. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  9. CMake
  10. can generate `graphviz <http://www.graphviz.org/>`_ files, showing the dependencies between the
  11. targets in a project and also external libraries which are linked
  12. against. When CMake is run with the ``--graphviz=foo.dot`` option, it will
  13. produce:
  14. * a ``foo.dot`` file showing all dependencies in the project
  15. * a ``foo.dot.<target>`` file for each target, file showing on which other targets the respective target depends
  16. * a ``foo.dot.<target>.dependers`` file, showing which other targets depend on the respective target
  17. The different dependency types ``PUBLIC``, ``PRIVATE`` and ``INTERFACE``
  18. are represented as solid, dashed and dotted edges.
  19. This can result in huge graphs. Using the file
  20. ``CMakeGraphVizOptions.cmake`` the look and content of the generated
  21. graphs can be influenced. This file is searched first in
  22. :variable:`CMAKE_BINARY_DIR` and then in :variable:`CMAKE_SOURCE_DIR`. If found, it is
  23. read and the variables set in it are used to adjust options for the
  24. generated graphviz files.
  25. .. variable:: GRAPHVIZ_GRAPH_TYPE
  26. The graph type.
  27. * Mandatory : NO
  28. * Default : "digraph"
  29. Valid graph types are:
  30. * "graph" : Nodes are joined with lines
  31. * "digraph" : Nodes are joined with arrows showing direction
  32. * "strict graph" : Like "graph" but max one line between each node
  33. * "strict digraph" : Like "graph" but max one line between each node in each direction
  34. .. variable:: GRAPHVIZ_GRAPH_NAME
  35. The graph name.
  36. * Mandatory : NO
  37. * Default : "GG"
  38. .. variable:: GRAPHVIZ_GRAPH_HEADER
  39. The header written at the top of the graphviz file.
  40. * Mandatory : NO
  41. * Default : "node [n fontsize = "12"];"
  42. .. variable:: GRAPHVIZ_NODE_PREFIX
  43. The prefix for each node in the graphviz file.
  44. * Mandatory : NO
  45. * Default : "node"
  46. .. variable:: GRAPHVIZ_EXECUTABLES
  47. Set this to FALSE to exclude executables from the generated graphs.
  48. * Mandatory : NO
  49. * Default : TRUE
  50. .. variable:: GRAPHVIZ_STATIC_LIBS
  51. Set this to FALSE to exclude static libraries from the generated graphs.
  52. * Mandatory : NO
  53. * Default : TRUE
  54. .. variable:: GRAPHVIZ_SHARED_LIBS
  55. Set this to FALSE to exclude shared libraries from the generated graphs.
  56. * Mandatory : NO
  57. * Default : TRUE
  58. .. variable:: GRAPHVIZ_MODULE_LIBS
  59. Set this to FALSE to exclude module libraries from the generated graphs.
  60. * Mandatory : NO
  61. * Default : TRUE
  62. .. variable:: GRAPHVIZ_EXTERNAL_LIBS
  63. Set this to FALSE to exclude external libraries from the generated graphs.
  64. * Mandatory : NO
  65. * Default : TRUE
  66. .. variable:: GRAPHVIZ_IGNORE_TARGETS
  67. A list of regular expressions for ignoring targets.
  68. * Mandatory : NO
  69. * Default : empty
  70. .. variable:: GRAPHVIZ_GENERATE_PER_TARGET
  71. Set this to FALSE to exclude per target graphs ``foo.dot.<target>``.
  72. * Mandatory : NO
  73. * Default : TRUE
  74. .. variable:: GRAPHVIZ_GENERATE_DEPENDERS
  75. Set this to FALSE to exclude depender graphs ``foo.dot.<target>.dependers``.
  76. * Mandatory : NO
  77. * Default : TRUE
  78. #]=======================================================================]