mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-28 21:20:35 +00:00
cmake: verify no undefined versioned symbols exist
This commit is contained in:
@@ -29,6 +29,8 @@ endfunction()
|
||||
function(SDL_AddCommonCompilerFlags TARGET)
|
||||
option(SDL_WERROR "Enable -Werror" OFF)
|
||||
|
||||
get_property(TARGET_TYPE TARGET "${TARGET}" PROPERTY TYPE)
|
||||
|
||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
||||
if(MINGW)
|
||||
# See if GCC's -gdwarf-4 is supported
|
||||
@@ -128,6 +130,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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user