Fix Xcode 15 linker warning
XCode 15 includes a completely new linker implementation. Hence some flags are deprecated. The default is now error so we can simply remove the linker option.
This commit is contained in:
parent
b3c8e99b68
commit
cd5ea90aee
1 changed files with 7 additions and 7 deletions
|
|
@ -142,10 +142,12 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
|
||||||
add_compile_options(-Werror=deprecated-copy)
|
add_compile_options(-Werror=deprecated-copy)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD"))
|
||||||
|
if (NOT APPLE)
|
||||||
# Error if there's symbols that are not found at link time.
|
# Error if there's symbols that are not found at link time.
|
||||||
add_link_options("-Wl,--no-undefined")
|
add_link_options("-Wl,--no-undefined")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
|
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
|
||||||
add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
|
add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
|
||||||
-Wunused-parameter -Wunused-value -Wunused-variable)
|
-Wunused-parameter -Wunused-value -Wunused-variable)
|
||||||
|
|
@ -156,11 +158,9 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
|
||||||
add_compile_options(-fno-exceptions)
|
add_compile_options(-fno-exceptions)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR CMAKE_SYSTEM_NAME STREQUAL "Emscripten"))
|
if(NOT (CMAKE_SYSTEM_NAME MATCHES "OpenBSD|Emscripten"))
|
||||||
# Error if there's symbols that are not found at link time. Some linkers do not support this flag.
|
# Error if there's symbols that are not found at link time. Some linkers do not support this flag.
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
if(NOT APPLE)
|
||||||
add_link_options("-Wl,-undefined,error")
|
|
||||||
elseif(NOT APPLE)
|
|
||||||
add_link_options("-Wl,--no-undefined")
|
add_link_options("-Wl,--no-undefined")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue