Guard list operation for the case the list is empty

This commit is contained in:
Dennis Klein 2018-08-03 16:38:02 +02:00 committed by Dennis Klein
parent ff701006fd
commit 70ffc0d8c6

View File

@ -228,7 +228,9 @@ if(BUILD_OFI_TRANSPORT)
set(OFI_DEPS OFI::libfabric protobuf::libprotobuf $<TARGET_OBJECTS:OfiTransport>) set(OFI_DEPS OFI::libfabric protobuf::libprotobuf $<TARGET_OBJECTS:OfiTransport>)
endif() endif()
set(optional_deps ${NANOMSG_DEPS} ${OFI_DEPS}) set(optional_deps ${NANOMSG_DEPS} ${OFI_DEPS})
if(optional_deps)
list(REMOVE_DUPLICATES optional_deps) list(REMOVE_DUPLICATES optional_deps)
endif()
target_link_libraries(${_target} target_link_libraries(${_target}
INTERFACE # only consumers link against interface dependencies INTERFACE # only consumers link against interface dependencies