Made the gcc warning flags stricter

This commit is contained in:
jpekkila
2019-07-03 16:38:31 +03:00
parent 08e9a32cb1
commit d4968d0583

View File

@@ -49,7 +49,7 @@ message(STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER_ID})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) # Because of GCC bug 48891 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) # Because of GCC bug 48891
message(FATAL_ERROR "GCC version 6.0 or higher required") message(FATAL_ERROR "GCC version 6.0 or higher required")
endif() endif()
endif() endif()
@@ -128,8 +128,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}\
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}\ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}\
-O0 -g") -O0 -g")
set (CXX_FLAGS_WARNING "-Wall -Wextra -Werror -Wno-error=unused-parameter\ set (CXX_FLAGS_WARNING "-Wall -Wextra -Werror")
-Wno-error=unused-function -Wno-error=unknown-pragmas")
# Also warn about implicit conversions if the compiler supports it # Also warn about implicit conversions if the compiler supports it
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")