1 2 3 4 5 6
unset(nosuchlist) list(SORT nosuchlist) if (DEFINED nosuchlist) message(FATAL_ERROR "list(SORT) created our list") endif ()