diff --git a/cmake/Modules/style_check.cmake b/cmake/Modules/style_check.cmake index 9a49729f937..b98f08722af 100644 --- a/cmake/Modules/style_check.cmake +++ b/cmake/Modules/style_check.cmake @@ -19,11 +19,11 @@ find_program(CLANG_FORMAT ${CLANG_FORMAT_FILENAME} PATHS ENV PATH) macro(STYLE_CHECK_FILE PATH) execute_process(COMMAND ${CLANG_FORMAT} -style=file -output-replacements-xml ${PATH} - OUTPUT_VARIABLE STYLE_CHECK_RESULT) - list(LENGTH STYLE_CHECK_RESULT RESULT_LENGTH) - if (RESULT_LENGTH GREATER 1) - list(APPEND ERROR_LIST ${PATH}) - endif() + OUTPUT_VARIABLE STYLE_CHECK_RESULT + ) + if("${STYLE_CHECK_RESULT}" MATCHES ".*