I am not entirely familiar with the scoping rules of cmake. I need to buildup a list of various files whilst doing RPC code-generation for an IDL.
function(generate_rpc file_name)
set(PROTO_FILES ${PROTO_FILES} ${file_name})
endfunction(generate_rpc)
generate_rpc(BasicProtocol.proto)
generate_rpc(dummy.proto)
message(STATUS "PROTO FILES: ${PROTO_FILES}")
The list is empty each time. I need append-able list that can be built from within a function.