Merge pull request #283

5c025f9 Check for Clang before adding compiler flag (warptangent)
This commit is contained in:
Riccardo Spagni 2015-05-14 15:51:19 +02:00
commit 478ec22a1a
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

View File

@ -213,7 +213,10 @@ else()
else()
set(ARCH_FLAG "-march=${ARCH}")
endif()
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized -Wno-deprecated-register")
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized")
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(WARNINGS "${WARNINGS} -Wno-deprecated-register")
endif()
if(NOT MINGW)
set(WARNINGS "${WARNINGS} -Werror") # to allow pedantic but not stop compilation
endif()