forked from libevent/libevent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: add various warning flags like autotools has
This is mostly to match autotools and reduce amount mixiing declarations and code. Added: - -Wextra (the same as -W), -Wno-unused-parameter -Wstrict-aliasing - -fno-strict-aliasing (gcc 2.9.5+) - -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement (4.0+) - -Waddress -Wno-unused-function -Wnormalized=id -Woverride-init (4.2+) - -Wlogical-op (4.5+) Removed: - -Wformat (include in -Wall) Plus use CMAKE_C_COMPILER_ID over CMAKE_COMPILER_IS_GNUCC, as cmake-variables(7) suggesting, and add common GNUC/CLANG variables. v2: drop checks for flags, since add_compiler_flags() will check if such flags exists anyway (but just to note, gcc ignores non existing warning flags by default).
- Loading branch information
Showing
1 changed file
with
54 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters