diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-04 14:01:39 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-04 12:10:25 +0000 |
commit | 624891e7c529e7dd94a26c1786e785a26953e918 (patch) | |
tree | 237100f966daaeaec73114106a510a794559845f /cmake | |
parent | 3bf6682ad468f2aedea6a0e1a483a46b85b60437 (diff) |
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>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtPlatformSupport.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/QtPlatformSupport.cmake b/cmake/QtPlatformSupport.cmake index 2468932179..ac9973905a 100644 --- a/cmake/QtPlatformSupport.cmake +++ b/cmake/QtPlatformSupport.cmake @@ -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() |