Merged requested to merge kfazi/cmake:fix-19500 into master
In !3402 (merged) the new member
cmCustomCommandGenerator::EmulatorsWithArguments was not initialized to the proper size. Fix this and add a test case covering the crash that could occur with multiple commands where an emulator appears only in a later command.
Fixes: #19500 (closed)