From a7a9256503fa40ba0d1e63ad21927600977242af Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 26 Apr 2017 04:00:21 -0500 Subject: [PATCH] Make warnings non-fatal during debug builds --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ccc056f01..dc872d29c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,10 +24,15 @@ if(NOT MSVC) -fno-rtti -Wsign-compare -Wunused-variable - -Werror #--analyze #-Os # GCC size optimization flag ) + + if (CMAKE_BUILD_TYPE STREQUAL "Release") + add_definitions( + -Werror + ) + endif() endif(NOT MSVC) enable_testing()