mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 09:44:02 +00:00
build: make -Wno-invalid-offsetof more specific
This commit is contained in:
parent
2a31f932f9
commit
74d95c7ee8
1 changed files with 8 additions and 3 deletions
|
@ -357,9 +357,6 @@ IF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
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" CACHE STRING "Flags used for release builds" FORCE)
|
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
|
${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(MACOSX)
|
||||||
IF(NOT AQUARIA_USE_SDL2)
|
IF(NOT AQUARIA_USE_SDL2)
|
||||||
SET(COCOA_SRCS "${BBGEDIR}/Cocoa.mm")
|
SET(COCOA_SRCS "${BBGEDIR}/Cocoa.mm")
|
||||||
|
|
Loading…
Reference in a new issue