Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将 cpplint 与 CMake 一起使用:
set(CMAKE_CXX_CPPLINT cpplint; --filter=-build/include_subdir,-legal/copyright; --quiet)
但是即使 cpplint 产生了一些警告,构建仍然是成功的。 我找不到将这些警告视为错误的方法(类似于-warnings-as-errors用于 clang-tidy 时)并导致构建失败。
-warnings-as-errors
CMake 总是忽略 cpplint 退出代码。
源代码:
https://github.com/Kitware/CMake/blame/master/Source/cmcmd.cxx#L324