Iterate over results of execute_process

How can i get the result of a bash command in a list variable ?
Say I have the output of a command, run in cmake using execute_process (this output can be 100-200 lines large):

aa bb
cc dd 
ee ff

Now, I need to get this output into a cmake list variable, so that i can iterate over each line using foreach. So if i run:

foreach(line in ${final_line_list})
message(STATUS "${line}")
..other commands..
endforeach()

it should print:

aa bb
cc dd 
ee ff

I have tried to run sed and paste commands, but have been generally unsuccessful.

What about:

execute_process(COMMAND ... OUTPUT_VARIABLE outputs)
string(REPLACE "\n" ";" outputs "${outputs}")
foreach(line IN LISTS outputs)
  ...
endforeach()