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.

Attachment: 0001-GHS-Multi-Generator-use-shorter-collided-names.patch
Description: 0001-GHS-Multi-Generator-use-shorter-collided-names.patch

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to