Browse Source

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.
Vladimír Vondruš 13 years ago
parent
commit
fa9dbdaa2c
  1. 5
      src/CMakeLists.txt

5
src/CMakeLists.txt

@ -25,7 +25,10 @@
# Disable `-pedantic` for GCC 4.6, as the compiler doesn't like # Disable `-pedantic` for GCC 4.6, as the compiler doesn't like
# list-initialization of array of classes (RectangularMatrix constructors). It # 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. # 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}") string(REPLACE "-pedantic" "" CORRADE_CXX_FLAGS "${CORRADE_CXX_FLAGS}")
endif() endif()

Loading…
Cancel
Save