mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Check if -mno-ms-bitfields is avail before using
This commit is contained in:
parent
33a9274f22
commit
67ee82e1a7
2 changed files with 5 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ endif()
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||||
|
|
||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
file(STRINGS src/version.h SRB2_VERSION)
|
file(STRINGS src/version.h SRB2_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+\\.[0-9.]+" SRB2_VERSION ${SRB2_VERSION})
|
string(REGEX MATCH "[0-9]+\\.[0-9.]+" SRB2_VERSION ${SRB2_VERSION})
|
||||||
|
|
|
||||||
|
|
@ -408,7 +408,10 @@ 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")
|
||||||
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
|
check_cxx_compiler_flag("-mno-ms-bitfields" HAS_MS_BITFIELDS)
|
||||||
|
if(HAS_MS_BITFIELDS)
|
||||||
|
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Yes we know we use insecure CRT functions...
|
# Yes we know we use insecure CRT functions...
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue