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 1f7b87cd3d
Pick-to: 6.8 6.9
Fixes: QTBUG-135279
Change-Id: I0e0a989eb018c75ad1463700782bef9c7b999fa0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
5e74d2aada
commit
8effbbcefd
|
@ -26,7 +26,7 @@ if(MACOS AND NOT CMAKE_GENERATOR STREQUAL "Xcode")
|
||||||
set(entitlements_file
|
set(entitlements_file
|
||||||
"${__qt_internal_cmake_apple_support_files_path}/test.entitlements.plist")
|
"${__qt_internal_cmake_apple_support_files_path}/test.entitlements.plist")
|
||||||
add_custom_command(TARGET "${target_name}"
|
add_custom_command(TARGET "${target_name}"
|
||||||
POST_BUILD COMMAND codesign --sign -
|
POST_BUILD COMMAND codesign --sign - -f
|
||||||
--entitlements "${entitlements_file}"
|
--entitlements "${entitlements_file}"
|
||||||
"$<TARGET_FILE:${target_name}>"
|
"$<TARGET_FILE:${target_name}>"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue