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.
0001-ghs-gen-uses-cmake-vars-for-flags.patch
Description: 0001-ghs-gen-uses-cmake-vars-for-flags.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