cmake: modules: Remove duplicates only from existing ZEPHYR_MODULE_NAMES

Remove duplicates from ZEPHYR_MODULE_NAMES only if that list
exists. That avoids cmake error "list sub-command REMOVE_DUPLICATES
requires list to be present" if ZEPHYR_MODULE_NAMES is empty.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
This commit is contained in:
Wolfgang Puffitsch 2021-02-19 13:03:35 +01:00 committed by Anas Nashif
commit 4a01446a72

View file

@ -123,4 +123,6 @@ else()
endif() endif()
if(DEFINED ZEPHYR_MODULE_NAMES)
list(REMOVE_DUPLICATES ZEPHYR_MODULE_NAMES) list(REMOVE_DUPLICATES ZEPHYR_MODULE_NAMES)
endif()