Too restrictive for COFF OBJ files in __create_def

Hello,
I’m trying to use cmake for windows, and automatically generate symbols files definitions.

We can see in the code that a COFF file id accepted as valid if Characteristics is equal to 0, in my case this is not because I got the flag IMAGE_FILE_LINE_NUMS_STRIPPED by compiling with gcc (on windows yes).
And so this is broken.
The comment in the source code say Characteristics == 0 indicating that this is not linked COFF OBJ file, but it seems too much, right?

Here is the code:

And here the documentation of the COFF header: IMAGE_FILE_HEADER (winnt.h) - Win32 apps | Microsoft Learn

Is it too restrictive?