separate_arguments: Crash on UNIX_COMMAND with no arguments
From the original description of !5382 (merged):
Neovim's CMake files had a conditional on a variable "${CMAKE_C_FLAGS}" and my environment was not setting this variable. Then further on in the CMake file the variable was being used as follows.
separate_arguments(C_FLAGS_ARRAY UNIX_COMMAND ${CMAKE_C_FLAGS})
As CMAKE_C_FLAGS was never created this caused the "Segmentation Fault".
At first I changed the separate_arguments call to:
separate_arguments(C_FLAGS_ARRAY UNIX_COMMAND "${CMAKE_C_FLAGS}")
which fixed the issue and I could build neovim, but then I thought that it shouldn't be the responsibility of the user of CMake files to remember to add quoting around variables.