File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,17 @@ if(LLVM_LIBC_ENABLE_LINTING)
190
190
if (LLVM_LIBC_CLANG_TIDY )
191
191
# Check clang-tidy major version.
192
192
execute_process (COMMAND ${LLVM_LIBC_CLANG_TIDY} "--version"
193
- OUTPUT_VARIABLE CLANG_TIDY_OUTPUT )
193
+ OUTPUT_VARIABLE CLANG_TIDY_OUTPUT
194
+ ERROR_VARIABLE CLANG_TIDY_ERROR
195
+ RESULT_VARIABLE CLANG_TIDY_RESULT )
196
+
197
+ if (CLANG_TIDY_RESULT AND NOT CLANG_TIDY_RESULT EQUAL 0 )
198
+ message (FATAL_ERROR "Failed to execute '${LLVM_LIBC_CLANG_TIDY} --version'
199
+ output : '${CLANG_TIDY_OUTPUT} '
200
+ error : '${CLANG_TIDY_ERROR} '
201
+ result : '${CLANG_TIDY_RESULT} '
202
+ " )
203
+ endif ()
194
204
string (REGEX MATCH "[0-9]+" CLANG_TIDY_VERSION "${CLANG_TIDY_OUTPUT} " )
195
205
string (REGEX MATCH "[0-9]+" CLANG_MAJOR_VERSION
196
206
"${CMAKE_CXX_COMPILER_VERSION} " )
You can’t perform that action at this time.
0 commit comments