mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 22:31:18 -05:00
Merge topic 'capture-clang-tidy-errors'
80ebc55acmake: Report if the <LANG>_CLANG_TIDY tool exits with non-zeroce1abfa4cmake: If ldd for LINK_WHAT_YOU_USE fails to run then report why44de6157cmake: Comment why we ignore the include-what-you-use return code
This commit is contained in:
@@ -0,0 +1 @@
|
||||
[^0]
|
||||
@@ -0,0 +1,2 @@
|
||||
stdout from bad command line arg '-bad'
|
||||
stderr from bad command line arg '-bad'
|
||||
@@ -0,0 +1,3 @@
|
||||
enable_language(C)
|
||||
set(CMAKE_C_CLANG_TIDY "${PSEUDO_TIDY}" -bad)
|
||||
add_executable(main main.c)
|
||||
@@ -20,3 +20,4 @@ if (NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
|
||||
run_tidy(C-launch)
|
||||
run_tidy(CXX-launch)
|
||||
endif()
|
||||
run_tidy(C-bad)
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
int main(void)
|
||||
{
|
||||
fprintf(stderr, "should add these lines:\n#include <...>\n");
|
||||
return 0;
|
||||
/* include-what-you-use always returns failure */
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int i;
|
||||
for (i = 1; i < argc; ++i) {
|
||||
if (strcmp(argv[i], "-bad") == 0) {
|
||||
fprintf(stdout, "stdout from bad command line arg '-bad'\n");
|
||||
fprintf(stderr, "stderr from bad command line arg '-bad'\n");
|
||||
return 1;
|
||||
}
|
||||
if (argv[i][0] != '-') {
|
||||
fprintf(stdout, "%s:0:0: warning: message [checker]\n", argv[i]);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user