From 5f6061590f1d372d1c79ed78d2000532584e97ac Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 16 Jan 2013 19:04:08 +0000 Subject: [PATCH] Added -Wextra, and an option to disable -Werror --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e1716b..8b7089e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ project(pulseview) #= User Options #------------------------------------------------------------------------------- +option(DISABLE_WERROR "Build without -Werror" FALSE) option(ENABLE_TESTS "Enable unit tests" FALSE) option(STATIC_PKGDEPS_LIBS "Statically link to (pkgconfig) libraries" FALSE) @@ -138,7 +139,11 @@ include(${QT_USE_FILE}) #------------------------------------------------------------------------------- add_definitions(${QT_DEFINITIONS}) -add_definitions(-Werror -Wall) +add_definitions(-Wextra) + +if(NOT DISABLE_WERROR) + add_definitions(-Werror) +endif() #=============================================================================== #= Global Include Directories -- 2.30.2