diff options
author | Petr Štetiar <ynezz@true.cz> | 2020-12-08 16:43:29 +0100 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2020-12-10 12:24:34 +0100 |
commit | 3bc05402bfabc711a335262cbb40664b6dfb1240 (patch) | |
tree | cb2d3e29d9dc0d07d801bc1a8a9755e510966289 | |
parent | cd2c3d12db432dd8a484e34818d1a30f84ad9fae (diff) | |
download | ustream-ssl-3bc05402bfabc711a335262cbb40664b6dfb1240.tar.gz |
cmake: enable extra compiler checks
Let's enforce additional automatic checks enforced by the compiler in
order to catch possible errors during compilation.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bb2abe5..b883751 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,13 @@ cmake_minimum_required(VERSION 2.6) INCLUDE(CheckSymbolExists) PROJECT(ustream-ssl C) -ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations) + +ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3) +IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6) + ADD_DEFINITIONS(-Wextra -Werror=implicit-function-declaration) + ADD_DEFINITIONS(-Wformat -Werror=format-security -Werror=format-nonliteral) +ENDIF() +ADD_DEFINITIONS(-Wno-unused-parameter -Wmissing-declarations) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") |