mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-12-02 15:56:58 +00:00
cmake: fix Windows unrecognized option link warning
This fixes a warning that could show up on some MS linkers which use a slightly different warning message than expected. Amends check_linker_supports_version_file to include the "unrecognized option" warning message.
This commit is contained in:
parent
9302d7732d
commit
59b37d0e5b
@ -86,7 +86,7 @@ function(check_linker_supports_version_file VAR)
|
||||
cmake_push_check_state()
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.sym" "n_0 {\n global:\n func;\n local: *;\n};\n")
|
||||
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/dummy.sym")
|
||||
check_c_source_compiles("int func(void) {return 0;} int main(int argc,char*argv[]){(void)argc;(void)argv;return func();}" LINKER_SUPPORTS_VERSION_SCRIPT FAIL_REGEX "(unsupported|syntax error)")
|
||||
check_c_source_compiles("int func(void) {return 0;} int main(int argc,char*argv[]){(void)argc;(void)argv;return func();}" LINKER_SUPPORTS_VERSION_SCRIPT FAIL_REGEX "(unsupported|syntax error|unrecognized option)")
|
||||
cmake_pop_check_state()
|
||||
set(${VAR} "${LINKER_SUPPORTS_VERSION_SCRIPT}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
Loading…
Reference in New Issue
Block a user