diff options
author | Sven Gothel <[email protected]> | 2020-10-20 05:52:33 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-10-20 05:52:33 +0200 |
commit | 8bc90fe1dff89fdbd6c508a313d8570e758d76b7 (patch) | |
tree | ae7d65bb2ade817255b49025652e341e003899d1 | |
parent | 1c54ef46cb137dec49748c5b9c237c6ccd139f6f (diff) |
cmake: Add warning (=error): -Wshadow -Wtype-limits -Wsign-compare
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0598d6a0..28f83a33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,10 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON) # for all set (CC_FLAGS_WARNING "-Wall -Wextra -Werror") set (GCC_FLAGS_WARNING_FORMAT "-Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-y2k") -set (GCC_FLAGS_WARNING "-Wall -Wextra -Wcast-align=strict -Wnull-dereference -Winit-self ${GCC_FLAGS_WARNING_FORMAT} -Werror") +set (GCC_FLAGS_WARNING "-Wall -Wextra -Wshadow -Wtype-limits -Wsign-compare -Wcast-align=strict -Wnull-dereference -Winit-self ${GCC_FLAGS_WARNING_FORMAT} -Werror") + +# too pedantic, but nice to check once in a while +# set (DISABLED_CC_FLAGS_WARNING "-Wsign-conversion") # debug only set (GCC_FLAGS_STACK "-fstack-protector-strong -fstack-check") |