Turn off linker version script support on macOS

The test erroneously succeeds on macOS with an XCode generator.
Explicitly set the test result to be turned off.

Change-Id: Id6fcb96f420f611517e81cc3697f1c88b508bd7c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Alexandru Croitor 2019-04-08 17:10:23 +02:00
parent 677a7a3066
commit e7c992755e

View File

@ -121,6 +121,13 @@ VERS_1;
endif()
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
# For some reason the linker command line written by the XCode generator, which is
# subsequently executed by xcodebuild, ignores the linker flag, and thus the test
# seemingly succeeds. Explicitly disable the version script test on darwin platforms.
if(APPLE)
set(HAVE_LD_VERSION_SCRIPT OFF)
endif()
set(TEST_ld_version_script "${HAVE_LD_VERSION_SCRIPT}" CACHE INTERNAL "linker version script support")
endfunction()