From fa9dbdaa2c9a5815a9f007a5a1ed2718d1217aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 4 Jan 2014 01:45:03 +0100 Subject: [PATCH] Disable `-pedantic` also for GCC 4.5 and 4.4. It litters the output with "comma at the end of enumeration list" (in most cases caused by glLoadGen), although it's perfectly valid in C++11. --- src/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7080f890a..07e2de9c0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -25,7 +25,10 @@ # Disable `-pedantic` for GCC 4.6, as the compiler doesn't like # list-initialization of array of classes (RectangularMatrix constructors). It # is perfectly legal C++11 and both GCC 4.7 and Clang accept it without notice. -if(CORRADE_GCC46_COMPATIBILITY AND NOT CORRADE_GCC45_COMPATIBILITY) +# Disable it also for GCC <=4.5, because otherwise the compiler output is +# ridden with "warning: comma at the end of enumerator list", which is also +# legal C++11. +if(CORRADE_GCC46_COMPATIBILITY) string(REPLACE "-pedantic" "" CORRADE_CXX_FLAGS "${CORRADE_CXX_FLAGS}") endif()