Merge GitHub PR #514 into next

fix ARM builds being completely broken

Conditionally adds -mno-ms-bitfields based on architecture, as this is
only relevant on Intel architectures.

https://github.com/STJr/SRB2/pull/514
This commit is contained in:
Eidolon 2023-02-08 21:11:23 -06:00
commit 707860815b

View file

@ -127,7 +127,9 @@ endif()
# Compatibility flag with later versions of GCC
# We should really fix our code to not need this
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|x64|amd64|AMD64|em64t|EM64T)")
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
endif()
endif()
# Compiler warnings configuration