CMake/Tests/RunCMake/pseudo_cpplint.c
Jamie Snape 0618ddf6b1 Add properties to run the cpplint style checker with the compiler
Create a `<LANG>_CPPLINT` target property (initialized by a
`CMAKE_<LANG>_CPPLINT` variable) to specify a `cpplint` style checker
command line to be run along with the compiler.
2017-01-23 14:47:13 -05:00

22 lines
462 B
C

#include <stdio.h>
#include <string.h>
int main(int argc, char* argv[])
{
int error = 0;
int i;
for (i = 1; i < argc; ++i) {
if (strcmp(argv[i], "--error") == 0) {
error = 1;
}
if (argv[i][0] != '-') {
if (error) {
fprintf(stderr, "%s:0: message [category/category] [0]\n", argv[i]);
}
fprintf(stdout, "Done processing %s\nTotal errors found: %i\n", argv[i],
error);
}
}
return error;
}