Don't run version script test when its result won't be used
Pick-to: 6.2 6.5 Task-number: QTBUG-111514 Change-Id: Ibcac8cd591125f173e906e256d08593764a1cf66 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
313bb32364
commit
bc85390dcc
@ -115,6 +115,11 @@ endfunction()
|
|||||||
|
|
||||||
|
|
||||||
function(qt_run_linker_version_script_support)
|
function(qt_run_linker_version_script_support)
|
||||||
|
# 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.
|
||||||
|
# Also makes no sense with MSVC-style command-line
|
||||||
|
if(NOT APPLE AND NOT MSVC)
|
||||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version_flag.map" "VERS_1 { global: sym; };
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version_flag.map" "VERS_1 { global: sym; };
|
||||||
VERS_2 { global: sym; }
|
VERS_2 { global: sym; }
|
||||||
VERS_1;
|
VERS_1;
|
||||||
@ -137,15 +142,7 @@ VERS_1;
|
|||||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
|
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
|
||||||
endif()
|
endif()
|
||||||
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
|
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
|
||||||
|
else()
|
||||||
# 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()
|
|
||||||
# Also makes no sense with MSVC-style command-line
|
|
||||||
if(MSVC)
|
|
||||||
set(HAVE_LD_VERSION_SCRIPT OFF)
|
set(HAVE_LD_VERSION_SCRIPT OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user