1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-29 00:05:50 +00:00

build: make -Wno-invalid-offsetof more specific

This commit is contained in:
Jan Beich 2015-09-18 05:16:57 +00:00
parent 2a31f932f9
commit 74d95c7ee8

View file

@ -357,9 +357,6 @@ IF(CMAKE_COMPILER_IS_GNUCC)
ADD_DEFINITIONS(-fno-stack-protector)
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.
# Exceptions are not used, excluding support for release builds adds less bulk as well.
set(CMAKE_C_FLAGS_RELEASE "-O2" CACHE STRING "Flags used for release builds" FORCE)
@ -451,6 +448,14 @@ SET(AQUARIA_SRCS_UNUSED
${SRCDIR}/WaterFont.cpp
)
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
SET_SOURCE_FILES_PROPERTIES(
# We knowingly apply offsetof to non-POD types.
${SRCDIR}/ScriptInterface.cpp
PROPERTIES COMPILE_FLAGS "-Wno-invalid-offsetof"
)
ENDIF()
IF(MACOSX)
IF(NOT AQUARIA_USE_SDL2)
SET(COCOA_SRCS "${BBGEDIR}/Cocoa.mm")