From 1c8d282ec863de24664c5de3ffb0c9f77991ca79 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Wed, 12 Feb 2020 04:53:39 +0100 Subject: ECMQtDeclareLoggingCategory: gently deal with no categories exported With some build configurations no catgories might be registered for a given export id. Instead of failing hard and thus forcing to catch this situation explicitly on the caller side, be grateful on the callee side and just generate an empty file, so the installed file set is consistent. GIT_SILENT --- modules/ECMQtDeclareLoggingCategory.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/ECMQtDeclareLoggingCategory.cmake') diff --git a/modules/ECMQtDeclareLoggingCategory.cmake b/modules/ECMQtDeclareLoggingCategory.cmake index a2260c71..640afa9e 100644 --- a/modules/ECMQtDeclareLoggingCategory.cmake +++ b/modules/ECMQtDeclareLoggingCategory.cmake @@ -335,7 +335,7 @@ function(ecm_qt_install_logging_categories) get_property(has_category GLOBAL PROPERTY "${_propertyprefix}_CATEGORIES" SET) if (NOT has_category) - message(FATAL_ERROR "${ARGS_EXPORT} is an unknown qt logging category export name.") + message(AUTHOR_WARNING "No Qt logging categories exported for \"${ARGS_EXPORT}\", generating & installing an empty file.") endif() get_property(_categories GLOBAL PROPERTY "${_propertyprefix}_CATEGORIES") -- cgit v1.2.1