diff options
Diffstat (limited to 'cmake/target-graphs.cmake')
-rw-r--r-- | cmake/target-graphs.cmake | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cmake/target-graphs.cmake b/cmake/target-graphs.cmake new file mode 100644 index 000000000..ad1023cd7 --- /dev/null +++ b/cmake/target-graphs.cmake @@ -0,0 +1,32 @@ +############################################################################### +# Top contributors (to current version): +# Gereon Kremer +# +# This file is part of the cvc5 project. +# +# Copyright (c) 2009-2021 by the authors listed in the file AUTHORS +# in the top-level source directory and their institutional affiliations. +# All rights reserved. See the file COPYING in the top-level source +# directory for licensing information. +# ############################################################################# +# Provides cmake target target-graphs with generates (png) dependency graphs +# to visualize the interdependencies of all cmake targets. +## + +get_target_property(APITESTS build-apitests MANUALLY_ADDED_DEPENDENCIES) +string(REPLACE ";" " " APITESTS "${APITESTS}") + +configure_file( + cmake/CMakeGraphVizOptions.cmake.in + ${CMAKE_BINARY_DIR}/CMakeGraphVizOptions.cmake + @ONLY +) + +add_custom_target(target-graphs + COMMAND + ${CMAKE_COMMAND} --graphviz=target-graphs/graph.dot ${CMAKE_SOURCE_DIR} + COMMAND + find target-graphs/ -iname "graph.dot*" -and \! -iname "*.png" + -exec dot -Tpng -O {} + + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +) |