Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake options to support cross-compilation #60

Merged
merged 2 commits into from
Jun 6, 2020

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented May 23, 2020

This commit adds two CMake options:

  • INSTALL_IGN_MSGS_GEN_EXECUTABLE if this option is enabled, the ign_msgs_gen protobuf executable plugin is also installed, so that this option can be enabled in host builds to permit cross-compilation builds to use it to generate the messages. As this executable is not side by side installable with other ignition-msgs installations with different major versions and this is an advanced option meant just for packaging, by default it is set to OFF.
  • IGN_MSGS_GEN_EXECUTABLE: this string variable can be set to have ign-msgs use a ign_msgs_gen executable plugin that was not build by the project, to enable cross-compilation scenarios.

Fix #34 .

@traversaro traversaro requested a review from caguero as a code owner May 23, 2020 10:19
This commit adds two CMake options:
* INSTALL_IGN_MSGS_GEN_EXECUTABLE if this option is enabled, the
  ign_msgs_gen protobuf executable plugin is also installed, so
  that this option can be enabled in host builds to permit
  cross-compilation builds to use it to generate the messages.
  As this executable is not side by side installable with other
  ignition-msgs installations with different major versions and is an
  advanced option meant just for packaging, by default it is set to OFF.
* IGN_MSGS_GEN_EXECUTABLE: this string variable can be set to
  have ign-msgs use a ign_msgs_gen executable plugin that was not
  build by the project, to enable cross-compilation scenarios.

Signed-off-by: Silvio Traversaro <silvio.traversaro@iit.it>
@traversaro
Copy link
Contributor Author

Related vcpkg PR: microsoft/vcpkg#11538 .

@caguero
Copy link
Collaborator

caguero commented May 26, 2020

Hi @traversaro, this is great! Could you provide a simple step-by-step example/instructions that show how to take advantage of this feature please? It doesn't have to be in the code, a comment with the instructions is enough.

@traversaro
Copy link
Contributor Author

Hi @iche033, do you mean as a comment in the CMake code or somewhere else?

@caguero
Copy link
Collaborator

caguero commented May 31, 2020

Hi @iche033, do you mean as a comment in the CMake code or somewhere else?

In the description or in the CMake code.

Signed-off-by: Silvio Traversaro <silvio.traversaro@iit.it>
@traversaro
Copy link
Contributor Author

I added some docs as CMake comments in 3226f99 .

@caguero
Copy link
Collaborator

caguero commented Jun 1, 2020

I added some docs as CMake comments in 3226f99 .

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants