简体   繁体   中英

Cpplint and CMake - Treat warnings are errors and fail

I'm using cpplint with CMake:

set(CMAKE_CXX_CPPLINT cpplint;
    --filter=-build/include_subdir,-legal/copyright;
    --quiet)

But even if cpplint produces some warnings, the build is still successful.
I cannot find a way to treat those warnings as error (similarly to when using -warnings-as-errors for clang-tidy) and fail the build instead.

CMake always ignores the cpplint exit code.

Source code:

https://github.com/Kitware/CMake/blame/master/Source/cmcmd.cxx#L324

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM