diff options
author | Corentin Plouet <corentin@plouet.name> | 2019-10-08 02:45:30 (GMT) |
---|---|---|
committer | Corentin Plouet <corentin@plouet.name> | 2019-10-08 02:45:56 (GMT) |
commit | 553658393c0e775efdec6b29b69c1274fb771e83 (patch) | |
tree | d2b0e6774925a8d274600ee1ff825125b51292be /Tests/RunCMake/RunCMake.cmake | |
parent | 4c29297495b53e07f61a6de1f5f689ddd6bab7bd (diff) | |
download | CMake-553658393c0e775efdec6b29b69c1274fb771e83.zip CMake-553658393c0e775efdec6b29b69c1274fb771e83.tar.gz CMake-553658393c0e775efdec6b29b69c1274fb771e83.tar.bz2 |
Graphviz: added test suite, fixes, enhancements
* Added a fairly comprehensive test suite
* Separated the graph traversal logic from the Graphviz generation
code by introducing a new class, cmLinkItemsGraphVisitor{.h,cxx}
* Made the graph traversal logic less ad-hoc by using existing
methods in the GlobalGenerator; this fixed a few bugs
* Added support for new target types: custom targets, object
and unknown libraries
* Improved support for ALIAS libraries by showing the alias(es)
in the graph
* Introduced new flags to control those new libraries (consistent
with existing flags)
* Updated the documentation
* Removed useless setting to set graph type in dot file
* Improved the node/edge shapes (nicer, more consistent)
* Added a legend to the graph
* Some refactoring and cleanup of the Graphviz generation code
* Added test and fix for issue 19746
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index da4d1e5..f24cfab 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -204,5 +204,28 @@ function(run_cmake_with_options test) run_cmake(${test}) endfunction() +function(ensure_files_match expected_file actual_file) + if(NOT EXISTS "${expected_file}") + message(FATAL_ERROR "Expected file does not exist:\n ${expected_file}") + endif() + if(NOT EXISTS "${actual_file}") + message(FATAL_ERROR "Actual file does not exist:\n ${actual_file}") + endif() + file(READ "${expected_file}" expected_file_content) + file(READ "${actual_file}" actual_file_content) + if(NOT "${expected_file_content}" STREQUAL "${actual_file_content}") + message(FATAL_ERROR "Actual file content does not match expected:\n + \n + expected file: ${expected_file}\n + expected content:\n + ${expected_file_content}\n + \n + actual file: ${actual_file}\n + actual content:\n + ${actual_file_content}\n + ") + endif() +endfunction() + # Protect RunCMake tests from calling environment. unset(ENV{MAKEFLAGS}) |