diff options
author | Alexander Lohnau <alexander.lohnau@gmx.de> | 2021-05-18 07:04:06 +0200 |
---|---|---|
committer | Alexander Lohnau <alexander.lohnau@gmx.de> | 2021-05-18 14:24:20 +0200 |
commit | 9d22f7b72412c7ccdd843de6e41028fe903f570a (patch) | |
tree | 0034869b96d586d248f5ac7329b0833fb506e88c /kde-modules/appstreamtest.cmake | |
parent | ccd1db5ec167388c4b7dac8fa7cf099fc56f02a1 (diff) | |
download | extra-cmake-modules-9d22f7b72412c7ccdd843de6e41028fe903f570a.tar.gz extra-cmake-modules-9d22f7b72412c7ccdd843de6e41028fe903f570a.tar.bz2 |
appstreamtest: Check if file exists before testing it
In case one has uninstalled the project, but has made local changes that
should be tested the test would fail. Instead check if the files exist
before adding them to the list of files that will be tested.
Diffstat (limited to 'kde-modules/appstreamtest.cmake')
-rw-r--r-- | kde-modules/appstreamtest.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kde-modules/appstreamtest.cmake b/kde-modules/appstreamtest.cmake index 8361473b..6710fded 100644 --- a/kde-modules/appstreamtest.cmake +++ b/kde-modules/appstreamtest.cmake @@ -13,7 +13,11 @@ foreach(file IN LISTS out) continue() endif() - list(APPEND metadatafiles ${file}) + if(EXISTS ${file}) + list(APPEND metadatafiles ${file}) + else() + message(WARNING "Could not find ${file}") + endif() endforeach() if(metadatafiles) |