Allow the script to work in older cmake

This commit is contained in:
Jean Pierre Cimalando 2021-04-05 03:10:00 +02:00
parent 62919343c3
commit 308eb788e6

View file

@ -4,7 +4,7 @@ function(string_left_pad VAR INPUT LENGTH FILLCHAR)
set(_output "${INPUT}") set(_output "${INPUT}")
string(LENGTH "${_output}" _length) string(LENGTH "${_output}" _length)
while(_length LESS "${LENGTH}") while(_length LESS "${LENGTH}")
string(PREPEND _output "${FILLCHAR}") set(_output "${FILLCHAR}${_output}")
string(LENGTH "${_output}" _length) string(LENGTH "${_output}" _length)
endwhile() endwhile()
set("${VAR}" "${_output}" PARENT_SCOPE) set("${VAR}" "${_output}" PARENT_SCOPE)