aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <ervin@kde.org>2016-12-29 16:39:25 +0100
committerKevin Ottens <ervin@kde.org>2016-12-30 08:41:16 +0100
commit5ed7ba07e4f382f4e07e2de7feca33c16a2793f7 (patch)
tree4272c91859024b93417e809ff5e9b60268fa93a0
parentc38e698cf3f33f2280d6d134bd0484d8051a33e7 (diff)
downloadextra-cmake-modules-5ed7ba07e4f382f4e07e2de7feca33c16a2793f7.tar.gz
extra-cmake-modules-5ed7ba07e4f382f4e07e2de7feca33c16a2793f7.tar.bz2
appstreamtest: handle non-installed programs
Summary: If you just built the software without installing it and then run ctest, this will systematically fail while trying to read install_manifest.txt. With this patch this case is now handled gracefully, not forcing to install to have a test suite which fully passes. Reviewers: #frameworks, apol Differential Revision: https://phabricator.kde.org/D3860
-rw-r--r--kde-modules/appstreamtest.cmake10
1 files changed, 8 insertions, 2 deletions
diff --git a/kde-modules/appstreamtest.cmake b/kde-modules/appstreamtest.cmake
index e524bacb..8361473b 100644
--- a/kde-modules/appstreamtest.cmake
+++ b/kde-modules/appstreamtest.cmake
@@ -1,5 +1,11 @@
-file(READ "${INSTALL_FILES}" out)
-string(REPLACE "\n" ";" out "${out}")
+file(GLOB install_done "${INSTALL_FILES}")
+if (install_done)
+ file(READ "${INSTALL_FILES}" out)
+ string(REPLACE "\n" ";" out "${out}")
+else()
+ message("Not installed yet, skipping")
+ set(out "")
+endif()
set(metadatafiles)
foreach(file IN LISTS out)