update SDL3 to latest commit

This commit is contained in:
Sasha Szpakowski
2024-10-06 20:30:44 -03:00
parent 1b0fdc338b
commit 9e5eb1b018
1426 changed files with 242456 additions and 103496 deletions
+22
View File
@@ -29,6 +29,16 @@ endfunction()
function(SDL_AddCommonCompilerFlags TARGET)
option(SDL_WERROR "Enable -Werror" OFF)
get_property(TARGET_TYPE TARGET "${TARGET}" PROPERTY TYPE)
if(MSVC)
cmake_push_check_state()
check_c_compiler_flag("/W3" COMPILER_SUPPORTS_W3)
if(COMPILER_SUPPORTS_W3)
target_compile_options(${TARGET} PRIVATE "/W3")
endif()
cmake_pop_check_state()
endif()
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
if(MINGW)
# See if GCC's -gdwarf-4 is supported
@@ -59,6 +69,11 @@ function(SDL_AddCommonCompilerFlags TARGET)
sdl_target_compile_option_all_languages(${TARGET} "-Wundef")
endif()
check_c_compiler_flag(-Wfloat-conversion HAVE_GCC_WFLOAT_CONVERSION)
if(HAVE_GCC_WFLOAT_CONVERSION)
sdl_target_compile_option_all_languages(${TARGET} "-Wfloat-conversion")
endif()
check_c_compiler_flag(-fno-strict-aliasing HAVE_GCC_NO_STRICT_ALIASING)
if(HAVE_GCC_NO_STRICT_ALIASING)
sdl_target_compile_option_all_languages(${TARGET} "-fno-strict-aliasing")
@@ -123,6 +138,13 @@ function(SDL_AddCommonCompilerFlags TARGET)
if(HAVE_WERROR)
sdl_target_compile_option_all_languages(${TARGET} "-Werror")
endif()
if(TARGET_TYPE STREQUAL "SHARED_LIBRARY")
check_linker_flag(C "-Wl,--no-undefined-version" LINKER_SUPPORTS_NO_UNDEFINED_VERSION)
if(LINKER_SUPPORTS_NO_UNDEFINED_VERSION)
target_link_options(${TARGET} PRIVATE "-Wl,--no-undefined-version")
endif()
endif()
endif()
endif()