https://git.reactos.org/?p=reactos.git;a=commitdiff;h=35103558e14af35035e2ccc66fbdcabaffb5bfd2

commit 35103558e14af35035e2ccc66fbdcabaffb5bfd2
Author:     Mark Jansen <[email protected]>
AuthorDate: Sun Feb 7 14:02:01 2021 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Sun Feb 7 14:02:01 2021 +0100

    [CMAKE] Fix empty dependencies.graphml being created
---
 sdk/cmake/CMakeMacros.cmake | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/sdk/cmake/CMakeMacros.cmake b/sdk/cmake/CMakeMacros.cmake
index 62191f30913..80488a3a63b 100644
--- a/sdk/cmake/CMakeMacros.cmake
+++ b/sdk/cmake/CMakeMacros.cmake
@@ -18,12 +18,16 @@ function(add_dependency_edge _source _target)
 endfunction()
 
 function(add_dependency_header)
-    file(WRITE ${REACTOS_BINARY_DIR}/dependencies.graphml "<?xml 
version=\"1.0\" encoding=\"UTF-8\"?>\n<graphml>\n  <graph id=\"ReactOS 
dependencies\" edgedefault=\"directed\">\n")
+    if(GENERATE_DEPENDENCY_GRAPH)
+        file(WRITE ${REACTOS_BINARY_DIR}/dependencies.graphml "<?xml 
version=\"1.0\" encoding=\"UTF-8\"?>\n<graphml>\n  <graph id=\"ReactOS 
dependencies\" edgedefault=\"directed\">\n")
+    endif()
 endfunction()
 
 function(add_dependency_footer)
-    add_dependency_node(ntdll)
-    file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml "  
</graph>\n</graphml>\n")
+    if(GENERATE_DEPENDENCY_GRAPH)
+        add_dependency_node(ntdll)
+        file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml "  
</graph>\n</graphml>\n")
+    endif()
 endfunction()
 
 function(add_message_headers _type)

Reply via email to