BUG: make sure list is not size 0 before sort
This commit is contained in:
parent
81515ba8a5
commit
24bff45d1b
|
@ -568,8 +568,10 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
|
||||||
endif("${candidate}" MATCHES "${gp_regex}")
|
endif("${candidate}" MATCHES "${gp_regex}")
|
||||||
endforeach(candidate)
|
endforeach(candidate)
|
||||||
|
|
||||||
list(SORT ${prerequisites_var})
|
list(LENGTH ${prerequisites_var} prerequisites_var_length)
|
||||||
|
if(prerequisites_var_length GREATER 0)
|
||||||
|
list(SORT ${prerequisites_var})
|
||||||
|
endif(prerequisites_var_length GREATER 0)
|
||||||
if(${recurse})
|
if(${recurse})
|
||||||
set(more_inputs ${unseen_prereqs})
|
set(more_inputs ${unseen_prereqs})
|
||||||
foreach(input ${more_inputs})
|
foreach(input ${more_inputs})
|
||||||
|
|
Loading…
Reference in New Issue