Add `META_TIDY_EXCLUDE_REGEX` to exclude files from tidy target
This can be useful to exclude 3rd party files.
This commit is contained in:
parent
2de07d4cd0
commit
8961cf3a32
|
@ -328,6 +328,9 @@ set(FORMATABLE_FILES
|
||||||
# only format C/C++ files (and not eg. QML files)
|
# only format C/C++ files (and not eg. QML files)
|
||||||
if (FORMATABLE_FILES)
|
if (FORMATABLE_FILES)
|
||||||
list(FILTER FORMATABLE_FILES INCLUDE REGEX ".*\\.(c|cc|cpp|h|hh|hpp)")
|
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 ()
|
endif ()
|
||||||
|
|
||||||
# determine source files which might be passed to cmake-format
|
# determine source files which might be passed to cmake-format
|
||||||
|
|
Loading…
Reference in New Issue