Document support for module definition files (.def) as source files
I have a shared library which contains a source file with .def
extension and it provokes cmake to generate rule (it is stored as PRE_LINK in build.ninja
) executing cmake -E __create_def
.
I spent some time to analyse cmake source files to discover that this rule is Windows-specific. It should be documented somewhere.
I guess that the def file should contain list of object files or symbol names to be exported. I think it would be more intuitive if it would NOT be passed as source file. I think it is counterintuitive that having source file ended with .def
provokes such situation.
Maybe cmake should also generate error message that command is not working on user's platform. The error message that I used unknown command wasted a lot of my time since I though that rule was generated incorrectly (bad string concatenation or something).