Skip to content

Commit

Permalink
Fix separate_debug_info configure test for cross-compilation
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jobor committed Sep 28, 2021
1 parent 66a44f4 commit 5ef0e34
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions cmake/QtFeature.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion config.tests/separate_debug_info/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# special case skip regeneration
cmake_minimum_required(VERSION 3.16)
project(objcopytest LANGUAGES CXX)
include(CMakeFindBinUtils)
add_executable(objcopytest main.cpp)
add_custom_command(
TARGET objcopytest
Expand Down

0 comments on commit 5ef0e34

Please sign in to comment.