#2861: Check for macOS systems before adding "--no-undefined" to linker flags as it is not compatible with the default linker.

This commit is contained in:
Nicolas Morales 2022-01-11 11:40:50 +01:00
parent 57e25195eb
commit 66ac0df61b

View File

@ -163,7 +163,7 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
add_compile_options(-Werror=deprecated-copy) add_compile_options(-Werror=deprecated-copy)
endif() endif()
if(NOT CMAKE_VERSION VERSION_LESS "3.13") if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# 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() was added in CMake 3.13 - if using an earlier # add_link_options() was added in CMake 3.13 - if using an earlier
# version don't set this - it should be caught by presubmits anyway. # version don't set this - it should be caught by presubmits anyway.