diff options
Diffstat (limited to 'Tests/ExportImport/Import/check_installed.cmake')
-rw-r--r-- | Tests/ExportImport/Import/check_installed.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/ExportImport/Import/check_installed.cmake b/Tests/ExportImport/Import/check_installed.cmake new file mode 100644 index 000000000..6e51f9275 --- /dev/null +++ b/Tests/ExportImport/Import/check_installed.cmake @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.20) + +function(check_installed expect) + file(GLOB_RECURSE actual + LIST_DIRECTORIES TRUE + RELATIVE ${CMAKE_INSTALL_PREFIX} + ${CMAKE_INSTALL_PREFIX}/* + ) + if(actual) + list(SORT actual) + endif() + if(NOT "${actual}" MATCHES "${expect}") + message(FATAL_ERROR "Installed files: + ${actual} +do not match what we expected: + ${expect} +in directory: + ${CMAKE_INSTALL_PREFIX}") + endif() +endfunction() |