I was looking into this for Yoshimi and found that the only combination is stretch and cmake 3.4.1. This bug does not manifest in jessie after adding a testing mirror and installing the more recent cmake, so it seems to not be cmake's own problem.
I tried to compile using 'apt-get source -b' in both jessie and stretch, and neither would produce a package because 1 of 420 selftests failed, specifically #8 kwsys.testSystemTools. That's the only clue I got out of it but since it failed in both, I can't say it is even meaningful. On stretch, when I went into the Build directory after the tests and issued a 'make install' to merely try out the locally built copy without going through the packaging & installing, it produced the same crash as the official package. The same step repeated on jessie did not. So it seems to be triggered by stretch's environment and I'm out of ideas. The crash itself is by CMake's design-- obviously part of fltk_wrap_ui is that some lists (filenames etc.) are created but a list is coming back incomplete or empty, so cmGlobalGenerator::GetGeneratorTarget prints a message and returns a null pointer which the caller dereferences unconditionally. Yoshimi works around this now by using add_custom_command to run 'fluid -c' and adding the output sources to the project in the ordinary way. Hope this helps! -- Rob