Fix yarp_add_idl use when cross-compiling#2983
Draft
traversaro wants to merge 2 commits intorobotology:masterfrom
Draft
Fix yarp_add_idl use when cross-compiling#2983traversaro wants to merge 2 commits intorobotology:masterfrom
traversaro wants to merge 2 commits intorobotology:masterfrom
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update the release notes by adding a file in |
This was referenced Jul 6, 2023
Member
|
Marked as draft as discussed with @traversaro |
71900d2 to
ead1caf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In YARP are two CMake macros to run yarpidl programs,
yarp_idl_to_dirandyarp_add_idl.When cross-compiling (for exmaple for Android or iOS) , it is not possible for
yarp_idl_to_dirandyarp_add_idlto call theyarpidl_rosmsgandyarpidl_thriftprovided by the YARP that is used for linking the program, as that version tipically does not work for the system on which we are cross-compiling. For this reason, it is important that there is a way for users to specify manually theyarpidl_rosmsgandyarpidl_thriftexecutables thatyarp_idl_to_dirandyarp_add_idluse.Even before this PR,
yarp_idl_to_dirworks fine with cross-compilaton by specifing the CMake cache variablesYARPIDL_thrift_LOCATIONandYARPIDL_rosmsg_LOCATION. If this variables are not set, the one provided by the YARP used to link the applications are used instead.Before this PR,
yarp_add_idlwas not using the executable specified in theYARPIDL_thrift_LOCATIONandYARPIDL_rosmsg_LOCATIONvariable, while after this PR alsoyarp_add_idlworks fine in cross-compilation.