Fix linking error "ld: unknown option: --no-undefined" on macOS
This commit is contained in:
parent
5793fbd624
commit
6a7ec4be7b
@ -163,7 +163,7 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
|
|||||||
# Error if there's symbols that are not found at link time.
|
# Error if there's symbols that are not found at link time.
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
add_link_options("-Wl,-undefined,error")
|
add_link_options("-Wl,-undefined,error")
|
||||||
else()
|
elseif(NOT APPLE)
|
||||||
add_link_options("-Wl,--no-undefined")
|
add_link_options("-Wl,--no-undefined")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user