[cmake-developers] FW: FW: Initial Attempt at Green Hill MULTI IDE Generator Support

Geoffrey Viola Geoffrey.Viola at asirobots.com
Wed Apr 8 01:20:28 EDT 2015


Attached is a patch based off of the previous commit.

Some of the changes made were due to cmGhsMultiTargetGenerator's use of this->LocalGenerator->AddCompileOptions forcing the cmTarget* member to lose its constness. The other target generators use this method, but some of the cmGhsMultiTargetGenerator methods were made static for reuse by cmGlobalGhsMultiGenerator. cmGlobalGhsMultiGenerator needs to access const cmTarget* to create a top level build file to the target generator build files. Also, const was added to the cmTarget* parameter of some legacy methods because they were not mutating the data.

I had some difficulty getting some of the flags to enter seamlessly. When target_compile_options(${TARGET_NAME} PUBLIC ":optionsFile=\"${ABS_PATH}/rel/path/filename\"") is run in a CMakeLists.txt script, this->LocalGenerator->AddCompileOptions calls target->GetCompileOptions to get ":optionsFile=\"abs/path/rel/path/filename\"". But calling this->AppendFlagEscape with that string returns the same string. GHS MULTI needs the backslashes to be eliminated, but I'm not sure the best approach. I could add another option to Source/kwsys/system.c in the kwsysSystem_Shell__GetArgument function. Otherwise, I could do post processing or not even call this->LocalGenerator->AddCompileOptions. What would you recommend?

An experimental build was run here: https://open.cdash.org/buildSummary.php?buildid=3760780.

Thanks,
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-gen-uses-cmake-vars-for-flags.patch
Type: application/octet-stream
Size: 28564 bytes
Desc: 0001-ghs-gen-uses-cmake-vars-for-flags.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150408/a5ad2e0c/attachment-0001.obj>


More information about the cmake-developers mailing list