From 8effbbcefd8cae27cd5da07b4ffe3aa86dad83bf Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 7 Apr 2025 09:28:16 +0200 Subject: [PATCH] CMake: Force override while code signing qmltestrunner Some clang toolchains use implicit adhoc codesigning when compiling and linking executables. This causes an error for the qmltestrunner codesign call, saying that the executable is already signed. Force the codesign command to override the existing signature in that case. This is safe, because we build the executable from scratch. Amends 1f7b87cd3d0dff022b3c072016c6257cc5d9e93a Pick-to: 6.8 6.9 Fixes: QTBUG-135279 Change-Id: I0e0a989eb018c75ad1463700782bef9c7b999fa0 Reviewed-by: Joerg Bornemann --- tools/qmltestrunner/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qmltestrunner/CMakeLists.txt b/tools/qmltestrunner/CMakeLists.txt index 23a334273b..007421ede3 100644 --- a/tools/qmltestrunner/CMakeLists.txt +++ b/tools/qmltestrunner/CMakeLists.txt @@ -26,7 +26,7 @@ if(MACOS AND NOT CMAKE_GENERATOR STREQUAL "Xcode") set(entitlements_file "${__qt_internal_cmake_apple_support_files_path}/test.entitlements.plist") add_custom_command(TARGET "${target_name}" - POST_BUILD COMMAND codesign --sign - + POST_BUILD COMMAND codesign --sign - -f --entitlements "${entitlements_file}" "$" )