Fix CMake extraction of sub architecture test
The length check is hard coded to the length of the string under test. As the STRINGS match only filters out non printable characters, we've no guarantee that the characters before the == position are printable or not. So _pos may be > 1 and then string length check will be broken. Replaced this by a pattern match to see whether there's something after the ":". Fixes: QTBUG-120125 Pick-to: 6.5 Change-Id: I24971b3bc83ea05841dae21667fbbae3416cfcf9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit e7457ff171255148d92254316433d39ef1bd3d28) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit fa41643a7edc89f035ea63d024b68fb7dd585a15)
This commit is contained in:
parent
ca977a1c65
commit
493c596a6c
@ -73,7 +73,7 @@ function(qt_run_config_test_architecture)
|
||||
string(SUBSTRING "${_line}" ${_pos} -1 _architecture)
|
||||
endif()
|
||||
string(FIND "${_line}" "==Qt=magic=Qt== Sub-architecture:" _pos)
|
||||
if (_pos GREATER -1 AND ${lineLength} GREATER 33)
|
||||
if (_pos GREATER -1 AND NOT _line MATCHES "Sub-architecture:$")
|
||||
math(EXPR _pos "${_pos}+34")
|
||||
string(SUBSTRING "${_line}" ${_pos} -1 _sub_architecture)
|
||||
string(REPLACE " " ";" _sub_architecture "${_sub_architecture}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user