CMakeLists protection from empty lists