From b5296b7f78630ecbdc5e05d7b0d253460d1a3e5e Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Mon, 7 Jul 2014 15:19:20 +0200 Subject: [PATCH] Add CHECK flags in CMakeLists.txt --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b421ebf1..36b0f930b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,12 +9,13 @@ if(CMAKE_COMPILER_IS_GNUCC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -Wextra -W -Wdeclaration-after-statement") set(CMAKE_C_FLAGS_DEBUG "-g3 -O0") set(CMAKE_C_FLAGS_COVERAGE "-g3 -O0 -fprofile-arcs -ftest-coverage -lgcov") + set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS} -Werror -Wlogical-op -Wwrite-strings") endif(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_CLANG) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -Wextra -W -Wdeclaration-after-statement") set(CMAKE_C_FLAGS_DEBUG "-g3 -O0") - set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS} -Wpointer-arith -Wwrite-strings -Wdocumentation -Werror") + set(CMAKE_C_FLAGS_CHECK "${CMAKE_C_FLAGS} -Werror -Wpointer-arith -Wwrite-strings -Wdocumentation") endif(CMAKE_COMPILER_IS_CLANG) if(CMAKE_BUILD_TYPE STREQUAL "Coverage")