summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-09-28 10:51:25 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-09-28 15:59:31 +0200
commit5ef0e3435ee00fc5b975fb2f2e9100d98542e591 (patch)
treeb42d4ef1778d67040c0b8b3cb9cd22d5c06895b8 /cmake
parent66a44f4ebac0dc20422477afe794fa712dea01bc (diff)
Fix separate_debug_info configure test for cross-compilation
The separate_debug_info configure test uses the CMake variable CMAKE_OBJCOPY. CMakeFindBinUtils in the test project finds the host's objcopy despite CMAKE_TOOLCHAIN_FILE being correctly set. We now add CMAKE_OBJCOPY to the list of variables that are passed to configure test projects and remove the CMakeFindBinUtils include, which looks rather internal anyways. Pick-to: 6.2 Fixes: QTBUG-96798 Change-Id: I164c6bd1771e8789e9dd19b50573b33b8866bd3b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtFeature.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
index 5ad96439b9..f7435df9de 100644
--- a/cmake/QtFeature.cmake
+++ b/cmake/QtFeature.cmake
@@ -958,6 +958,7 @@ function(qt_get_platform_try_compile_vars out_var)
list(APPEND flags "CMAKE_CXX_FLAGS_DEBUG")
list(APPEND flags "CMAKE_CXX_FLAGS_RELEASE")
list(APPEND flags "CMAKE_CXX_FLAGS_RELWITHDEBINFO")
+ list(APPEND flags "CMAKE_OBJCOPY")
# Pass toolchain files.
if(CMAKE_TOOLCHAIN_FILE)