From 3ebfdf81a8bcb7e3e5ee6b563c9cb7550dd0ac77 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sat, 18 Apr 2020 19:50:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=8C=20=D0=BE=D1=82=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B0?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B5=D0=B4=D1=83=D0=BF=D1=80=D0=B5=D0=B6=D0=B4?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=B2=20=D1=80=D0=B5=D0=B6=D0=B8?= =?UTF-8?q?=D0=BC=D0=B5=20=D0=BE=D1=82=D0=BB=D0=B0=D0=B4=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCompilerFlags.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMLibCompilerFlags.cmake b/CMLibCompilerFlags.cmake index 8664705..2868e39 100644 --- a/CMLibCompilerFlags.cmake +++ b/CMLibCompilerFlags.cmake @@ -1,5 +1,7 @@ # based on https://github.com/bluescarni/yacma +option(CMLIB_WARNING_FLAGS "Enable warning flags" ON) + include(CheckCXXCompilerFlag) macro(CHECK_ENABLE_CXX_FLAG flag) @@ -35,7 +37,7 @@ if(CMAKE_CXX_COMPILER_IS_CLANG OR CMAKE_CXX_COMPILER_IS_INTEL OR CMAKE_CXX_COMPI set(CMAKE_CXX_STANDARD_REQUIRED YES) set(CMAKE_CXX_EXTENSIONS YES) - if(CMAKE_BUILD_TYPE STREQUAL "Debug") + if(CMLIB_WARNING_FLAGS AND CMAKE_BUILD_TYPE STREQUAL "Debug") check_enable_cxx_flag(-Wall) check_enable_cxx_flag(-Wextra) check_enable_cxx_flag(-Wnon-virtual-dtor)