summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorStephan Rohmen <s.rohmen@gmx.de>2020-07-21 17:47:34 (GMT)
committerBrad King <brad.king@kitware.com>2020-07-21 19:02:21 (GMT)
commita78e99142037c22218e7b122e4415ee3e1f943ed (patch)
tree1871fb1caebece68512a620ac0a8914fae55c007 /Tests
parent370a94c48757a80d936ebbaa774396538051707f (diff)
downloadCMake-a78e99142037c22218e7b122e4415ee3e1f943ed.zip
CMake-a78e99142037c22218e7b122e4415ee3e1f943ed.tar.gz
CMake-a78e99142037c22218e7b122e4415ee3e1f943ed.tar.bz2
Tests: Cover Graphviz support for per-target dependency graph options
Issue: #20928
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/Graphviz/default_options-check.cmake8
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication26
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers30
3 files changed, 64 insertions, 0 deletions
diff --git a/Tests/RunCMake/Graphviz/default_options-check.cmake b/Tests/RunCMake/Graphviz/default_options-check.cmake
index c9a7562..584e276 100644
--- a/Tests/RunCMake/Graphviz/default_options-check.cmake
+++ b/Tests/RunCMake/Graphviz/default_options-check.cmake
@@ -3,3 +3,11 @@ include(RunCMake)
ensure_files_match(
${RunCMake_TEST_SOURCE_DIR}/expected_outputs/dependency_graph_default_options.dot
${RunCMake_TEST_BINARY_DIR}/generated_dependency_graph.dot)
+
+ensure_files_match(
+ ${RunCMake_TEST_SOURCE_DIR}/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
+ ${RunCMake_TEST_BINARY_DIR}/generated_dependency_graph.dot.GraphicApplication)
+
+ensure_files_match(
+ ${RunCMake_TEST_SOURCE_DIR}/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
+ ${RunCMake_TEST_BINARY_DIR}/generated_dependency_graph.dot.CompilerFlags.dependers)
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
new file mode 100644
index 0000000..92fe609
--- /dev/null
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
@@ -0,0 +1,26 @@
+digraph "GraphicApplication" {
+node [
+ fontsize = "12"
+];
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node0" [ label = "CompilerFlags", shape = pentagon ];
+ "node2" -> "node0" // CoreLibrary -> CompilerFlags
+ "node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
+ "node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node0" [ label = "CompilerFlags", shape = pentagon ];
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
new file mode 100644
index 0000000..82a2efe
--- /dev/null
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
@@ -0,0 +1,30 @@
+digraph "CompilerFlags" {
+node [
+ fontsize = "12"
+];
+ "node0" [ label = "CompilerFlags", shape = pentagon ];
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node2" -> "node0" // CoreLibrary -> CompilerFlags
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
+ "node1" [ label = "ConsoleApplication", shape = egg ];
+ "node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+}