[cmake-developers] GHS Multi Duplicate Filenames

Geoffrey Viola Geoffrey.Viola at asirobots.com
Sun May 15 12:24:29 EDT 2016


Attached is a patch to shorten the names and avoid collisions for CMake's GHS MULTI generator. It uses the generic cmLocalGenerator's GetObjectFileNameWithoutTarget method and converts forward slashes to underscores.

The GHS MULTI builder has some unique limitations. Since the static libraries are converted to "Library" gpjs, they only consider the filename without extension or path to create an output file. "Relocatable Object" and "Merged Library" gps handle local paths for output files to avoid collisions, but those gpjs are not recommended for general purpose static libraries. Not having a '/' or '\' character in the output path is limiting.

Unless source files do not have extensions, collisions from collisions won't happen, because any output filename that has changed due to collision has the extension in it. The default output filename will not have an extension. It seems that a space turns into underscore with this method, but GHS MULTI can differentiate between these two characters. A failure could occur where a filename collides with one file in a subfolder with spaces and another with the same subfolder name with underscores. These edge cases are not considered in this patch.

Geoffrey Viola
SOFTWARE ENGINEER
asirobots.com



This message contains confidential information and is intended only for the recipient. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-GHS-Multi-Generator-use-shorter-collided-names.patch
Type: application/octet-stream
Size: 5119 bytes
Desc: 0001-GHS-Multi-Generator-use-shorter-collided-names.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160515/02c7471d/attachment.obj>


More information about the cmake-developers mailing list