aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2017-06-04 19:05:41 +0200
committerPino Toscano <pino@kde.org>2017-06-04 19:05:41 +0200
commit5fa41ecd623da7f69061bc5091bd4a3006c9895b (patch)
tree36465a4c432406d264ee977fc7769c58ce108e3f
parent5ec56f07e738ac0fba10c915496fd44bdc4494c4 (diff)
downloadextra-cmake-modules-5fa41ecd623da7f69061bc5091bd4a3006c9895b.tar.gz
extra-cmake-modules-5fa41ecd623da7f69061bc5091bd4a3006c9895b.tar.bz2
tests: improve error reporting for ECMAddAppIconTest
when checking whether there were new sources added (on Windows and Mac), check whether the variable is empty as list, instead of failing because of a cmake syntax error
-rw-r--r--tests/ECMAddAppIconTest/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/ECMAddAppIconTest/CMakeLists.txt b/tests/ECMAddAppIconTest/CMakeLists.txt
index 91da97ac..dc556c1d 100644
--- a/tests/ECMAddAppIconTest/CMakeLists.txt
+++ b/tests/ECMAddAppIconTest/CMakeLists.txt
@@ -13,7 +13,8 @@ set(ICONS 16-category-name.png 128-category-name.png)
ecm_add_app_icon(OUT ICONS ${ICONS})
if(WIN32 OR APPLE)
- if(${OUT} STREQUAL "")
+ list(LENGTH OUT out_count)
+ if(out_count EQUAL 0)
message(FATAL_ERROR "ecm_add_app_icon() haven't produced anything")
endif()
endif()