Skip to content

Commit

Permalink
avoid remove duplicates list call on empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Feb 21, 2018
1 parent b6900ce commit 297f9a0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/FindMetaExamples.cmake
Expand Up @@ -49,8 +49,14 @@ function(get_excluded_meta_examples)
binary/multiple_kernel_learning.sg
)
ENDIF()
LIST(REMOVE_DUPLICATES EXCLUDED_META_EXAMPLES)
SET(EXCLUDED_META_EXAMPLES ${EXCLUDED_META_EXAMPLES} PARENT_SCOPE)

# remove double entries to avoid errors due to "double" removing
LIST(LENGTH EXCLUDED_META_EXAMPLES NUM_EXCLUDED)
IF(NUM_EXCLUDED GREATER 0)
LIST(REMOVE_DUPLICATES EXCLUDED_META_EXAMPLES)
ENDIF()

SET(EXCLUDED_META_EXAMPLES ${EXCLUDED_META_EXAMPLES} PARENT_SCOPE)

endfunction()

Expand Down

0 comments on commit 297f9a0

Please sign in to comment.