BUG: make sure list is not size 0 before sort

This commit is contained in:
Bill Hoffman 2008-12-04 09:12:31 -05:00
parent 81515ba8a5
commit 24bff45d1b
1 changed files with 4 additions and 2 deletions

View File

@ -568,8 +568,10 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
endif("${candidate}" MATCHES "${gp_regex}")
endforeach(candidate)
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})