1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 14:09:06 +00:00

Suppress some annoying warnings about offsetof.

This commit is contained in:
James Le Cuirot 2014-06-08 21:42:27 +01:00
parent 43d41feeb8
commit 4d04c9cb94

View file

@ -344,7 +344,10 @@ IF(CMAKE_COMPILER_IS_GNUCC)
IF(AQUARIA_GCC_HAS_STACKPROT) IF(AQUARIA_GCC_HAS_STACKPROT)
ADD_DEFINITIONS(-fno-stack-protector) ADD_DEFINITIONS(-fno-stack-protector)
ENDIF(AQUARIA_GCC_HAS_STACKPROT) ENDIF(AQUARIA_GCC_HAS_STACKPROT)
# We knowingly apply offsetof to non-POD types.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof")
# -O3 breaks on some GCC/MinGW versions, make sure CMake does not set this as default. # -O3 breaks on some GCC/MinGW versions, make sure CMake does not set this as default.
# Exceptions are not used, excluding support for release builds adds less bulk as well. # Exceptions are not used, excluding support for release builds adds less bulk as well.
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "Flags used for release builds" FORCE) set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "Flags used for release builds" FORCE)