From eb835bc2ca3d50a33762df40e5cd259c22685f04 Mon Sep 17 00:00:00 2001 From: Gaelan Steele Date: Sun, 2 Mar 2014 14:20:56 -0800 Subject: [PATCH] Use -Werror. This makes all warnings errors. We don't want any warnings, so we should enforce that. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 363c03bdc4..065a5b09bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,9 +12,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # If the C compiler is some GNU-alike, use the gnu99 standard and enable all warnings. if(CMAKE_COMPILER_IS_GNUCC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wno-unused-parameter -std=gnu99") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -Wextra -pedantic -Wno-unused-parameter -std=gnu99") elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wno-unused-parameter -std=gnu99") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -Wextra -pedantic -Wno-unused-parameter -std=gnu99") endif(CMAKE_COMPILER_IS_GNUCC) add_definitions(-DHAVE_CONFIG_H)