There is currently no such feature in CMake, although I agree it would be quite useful in certain situations.
I usually rely on the fact that CMake has no problem with ignoring empty values in most contexts:
if(MINGW)
set(ADDITIONAL_ITEMS hello)
endif()
list(APPEND mylist
foo
bar
${ADDITIONAL_ITEMS}
cool
)
It's not perfect, but IMHO at least cleaner than appending to the same list twice. The same technique also works for conditionally passing function parameters.
Note that depending on the context where this is needed, CMake generator expressions might be an option:
target_link_libraries(t foo bar $<$<BOOL:${SOME_CONDITION}>:hello> cool)