From bd7120bae41b6e7ac86c664c8220b59cd57242bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Sat, 16 Mar 2024 23:43:20 +0100 Subject: [PATCH] Fix #12316, 268e512: Support for enum storage type in GenerateWidget.cmake (#12321) --- cmake/scripts/GenerateWidget.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/scripts/GenerateWidget.cmake b/cmake/scripts/GenerateWidget.cmake index b6748422f5..ffa5e6edea 100644 --- a/cmake/scripts/GenerateWidget.cmake +++ b/cmake/scripts/GenerateWidget.cmake @@ -56,11 +56,14 @@ foreach(ENUM IN LISTS ENUM_LINES) endif() # Check for enum match - if("${LINE}" MATCHES "^ *enum *${ENUM_PATTERN} *\{") + if("${LINE}" MATCHES "^ *enum *${ENUM_PATTERN}( *: *[^ ]*)? *\{") # REGEX REPLACE does a REGEX MATCHALL and fails if an empty string is matched string(REGEX MATCH "[^ ]*" RESULT "${LINE}") string(REPLACE "${RESULT}" "" RM_INDENT "${LINE}") + string(REGEX MATCH " *: *[^ ]*" RESULT "${LINE}") + string(REPLACE "${RESULT}" "" LINE "${LINE}") + set(ACTIVE 1) if(ACTIVE_COMMENT GREATER 0) string(APPEND ${PLACE_HOLDER} "\n${COMMENT}")