use -Wall -Wextra -Wpedantic when compiling with current gcc versions

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
pull/4804/head
Matthieu Gallien 4 months ago committed by Camila (Rebase PR Action)
parent 55fda4e275
commit 4cb87f59f5
  1. 2
      cmake/modules/Warnings.cmake

@ -19,7 +19,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)

Loading…
Cancel
Save