aminya / project_options

A general-purpose CMake library that provides functions that improve the CMake experience following the best practices.

Home Page:https://aminya.github.io/project_options/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an option to enable GCC 10+ analyzer

ddassie-texa opened this issue · comments

GCC has added an integrated static analyzer, it started it's life in GCC10 as an experimental feature, it would make sense to add an option to enable it, or just add "-fanalyzer" to the GCC warnings, it could also be treated similarly to the other analyzers like clang-tidy with the caveat that it only works when compiling with GCC 10 or newer.

See: https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html

Support for C++ is not ready yet - https://developers.redhat.com/articles/2022/04/12/state-static-analysis-gcc-12-compiler#toward_support_for_c__

Maybe it can be enable for C projects only

Yeah, I'm using it for C projects.