Fix linking error "ld: unknown option: --no-undefined" on macOS

This commit is contained in:
Jason Liu 2023-06-17 22:14:08 -04:00 committed by arcady-lunarg
parent 5793fbd624
commit 6a7ec4be7b

View File

@ -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.
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
add_link_options("-Wl,-undefined,error")
else()
elseif(NOT APPLE)
add_link_options("-Wl,--no-undefined")
endif()
endif()