Fix build with clang 8.0
When qt_parse_version_string tries to parse the compiler version into separate fields, it tries to accommodate for different number of digits separate by dots by checking the length of the list as it is mutated. Unfortunately the length variable is not a live variable, so after removing an entry from the list we must change the length variable manually. Change-Id: Ieaeb091581484e8c723fbb467697f73036e64ec9 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
3bf6682ad4
commit
624891e7c5
@ -49,6 +49,7 @@ function(qt_parse_version_string version_string out_var_prefix)
|
||||
if(length GREATER 0)
|
||||
list(GET version_list 0 value)
|
||||
list(REMOVE_AT version_list 0)
|
||||
math(EXPR length "${length}-1")
|
||||
endif()
|
||||
set(${out_var} "${value}" PARENT_SCOPE)
|
||||
|
||||
@ -58,6 +59,7 @@ function(qt_parse_version_string version_string out_var_prefix)
|
||||
list(GET version_list 0 value)
|
||||
set(${out_var} "${value}" PARENT_SCOPE)
|
||||
list(REMOVE_AT version_list 0)
|
||||
math(EXPR length "${length}-1")
|
||||
endif()
|
||||
set(${out_var} "${value}" PARENT_SCOPE)
|
||||
|
||||
@ -67,7 +69,7 @@ function(qt_parse_version_string version_string out_var_prefix)
|
||||
list(GET version_list 0 value)
|
||||
set(${out_var} "${value}" PARENT_SCOPE)
|
||||
list(REMOVE_AT version_list 0)
|
||||
|
||||
math(EXPR length "${length}-1")
|
||||
endif()
|
||||
set(${out_var} "${value}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
Loading…
Reference in New Issue
Block a user