Run cmake-format on tests specified via `QT_TESTS` variable

This commit is contained in:
Martchus 2022-10-16 15:04:30 +02:00
parent 3f072549a6
commit e502269d50
1 changed files with 5 additions and 0 deletions

View File

@ -359,6 +359,11 @@ set(FORMATABLE_FILES
${QML_HEADER_FILES}
${QML_SRC_FILES}
${EXCLUDED_FILES})
if (QT_TESTS)
foreach (QT_TEST ${QT_TESTS})
list(APPEND FORMATABLE_FILES "tests/${QT_TEST}.cpp")
endforeach ()
endif ()
# only format C/C++ files (and not eg. QML files)
if (FORMATABLE_FILES)
list(FILTER FORMATABLE_FILES INCLUDE REGEX ".*\\.(c|cc|cpp|h|hh|hpp)")