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