Check before using -mno-ms-bitfields

This commit is contained in:
Eidolon 2024-04-27 21:40:41 -05:00
parent 67ee82e1a7
commit f60f5a8648

View file

@ -408,8 +408,8 @@ endif()
# Compatibility flag with later versions of GCC # Compatibility flag with later versions of GCC
# We should really fix our code to not need this # We should really fix our code to not need this
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
check_cxx_compiler_flag("-mno-ms-bitfields" HAS_MS_BITFIELDS) check_cxx_compiler_flag("-mno-ms-bitfields" HAS_NO_MS_BITFIELDS)
if(HAS_MS_BITFIELDS) if(HAS_NO_MS_BITFIELDS)
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields) target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
endif() endif()
endif() endif()