From 7dc2c1656acaf938ba302521ab7741af3947a4a7 Mon Sep 17 00:00:00 2001 From: abv Date: Mon, 9 Nov 2015 07:47:29 +0300 Subject: [PATCH] 0026854: Use -Wextra with GCC Added option -Wextra for GCC compilation --- adm/cmake/occt_defs_flags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index 8232afb40e..6dd762fb8f 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -75,7 +75,7 @@ endif() # generate a single response file which enlist all of the object files SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1) SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1) -# increase compiler warnings level (-W4 for MSVC, -Wall for GCC) +# increase compiler warnings level (-W4 for MSVC, -Wextra for GCC) if (MSVC) if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]") string (REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") @@ -83,7 +83,7 @@ if (MSVC) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") endif() elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") endif() if (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")