Was experienced this error on Mageia 6 x86_64 (also confirmed on Debian [1]):
CMake Error at cmake/macros.cmake:131 (list):
list sub-command SORT requires list to be present.
Call Stack (most recent call first):
cmake/macros.cmake:726 (create_dir_header)
Was experienced this error on Mageia 6 x86_64 (also confirmed on Debian [1]):
[1] https://sources.debian.net/src/caveexpress/2.4%2Bgit20160609-1/debian/patches/build.patch/