From 31989740cdfa11718deed408db855e065fd1559d Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 5 May 2018 20:57:05 +0800 Subject: [PATCH] Comment out Werror flag in cmake script Werror flag should be only enabled on developer's machine, not for users using the product. Also fix formatting. --- cmake/Modules/MacroQbtCompilerSettings.cmake | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/cmake/Modules/MacroQbtCompilerSettings.cmake b/cmake/Modules/MacroQbtCompilerSettings.cmake index 455cd09e6..6468e7db3 100644 --- a/cmake/Modules/MacroQbtCompilerSettings.cmake +++ b/cmake/Modules/MacroQbtCompilerSettings.cmake @@ -11,18 +11,17 @@ macro(qbt_set_compiler_options) #-Wshadow -Wconversion ? set(_GCC_COMMON_C_AND_CXX_FLAGS "-Wall -Wextra" "-Wfloat-equal -Wcast-qual -Wcast-align" - "-Wsign-conversion -Winvalid-pch -Werror=return-type -Wno-long-long" -# -fstack-protector-all - "-Werror -Wno-error=deprecated-declarations" + "-Wsign-conversion -Winvalid-pch -Wno-long-long" + #"-fstack-protector-all" + #"-Werror -Wno-error=deprecated-declarations" ) - set (_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti" + set(_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti" "-Woverloaded-virtual -Wold-style-cast" "-Wnon-virtual-dtor -Wfloat-equal -Wcast-qual -Wcast-align" - "-Werror=overloaded-virtual" - # "-Weffc++" - "-Werror -Wno-error=cpp" + #"-Weffc++" + #"-Werror -Wno-error=cpp" # we should modify code to make these ones obsolete - "-Wno-error=sign-conversion -Wno-error=float-equal" + #"-Wno-error=sign-conversion -Wno-error=float-equal" ) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)