0

Is it possible to turn off warnings about unused parameters during using cmake? And do it in compiler independent fashion?

I mean that I don't want write custom code in CMakeLists.txt and I want to give a full trust to cmake, but I need a package, or cmake_policy about it.

Konstantin Burlachenko
  • 5,233
  • 2
  • 41
  • 40
  • 2
    See the answer for [How to set warning level in CMake?](http://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake) of @ruslo. CMake doesn't have this out-of-the-box but @ruslo has written a [`cross-platform warning suppression` CMake module](https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression) (see the [list of supported warnings](https://github.com/ruslo/leathers/wiki/List); it does include e.g. `unused-variable`). – Florian Apr 29 '16 at 07:40
  • Thanks for link, what does it mean "no" in "list of supported warnings"? – Konstantin Burlachenko Jul 12 '16 at 15:47
  • The "no" just means that there is no such warning suppression flag for this compiler. But I think in your case it is supported for all the covered compiler toolchains: see `unused-parameter` – Florian Jul 12 '16 at 19:04

0 Answers0