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}")
|
||||
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})
|
||||
set(more_inputs ${unseen_prereqs})
|
||||
foreach(input ${more_inputs})
|
||||
|
|
Loading…
Reference in New Issue