Browse Source

Add `META_TIDY_EXCLUDE_REGEX` to exclude files from tidy target

This can be useful to exclude 3rd party files.
master
Martchus 4 months ago
parent
commit
8961cf3a32
  1. 3
      cmake/modules/BasicConfig.cmake

3
cmake/modules/BasicConfig.cmake

@ -328,6 +328,9 @@ set(FORMATABLE_FILES
# 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)")
if (FORMATABLE_FILES AND META_TIDY_EXCLUDE_REGEX)
list(FILTER FORMATABLE_FILES EXCLUDE REGEX "${META_TIDY_EXCLUDE_REGEX}")
endif ()
endif ()
# determine source files which might be passed to cmake-format

Loading…
Cancel
Save