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

Added FEATURES option to corrosion_import_crate #99

Closed
wants to merge 2 commits into from

Conversation

kwek20
Copy link
Contributor

@kwek20 kwek20 commented Apr 12, 2021

Fixed #57 part 2.

I have not yet managed to solve the features using set_property

@kwek20
Copy link
Contributor Author

kwek20 commented Apr 12, 2021

Apparently the set_property restriction for interfaces is removed in 3.19.x, but still couldnt get it to work though
get_target_property() called with non-existent target "rust-lib"

Any ideas @AndrewGaspar ?

@kwek20 kwek20 changed the title [WIP] Added FEATURES option to corrosion_import_crate Added FEATURES option to corrosion_import_crate Apr 12, 2021
@ogoffart
Copy link
Collaborator

ogoffart commented May 5, 2021

I think being able to set the features is indeed needed. I'm probably going to make use of that at some point.

I'm just afraid that the way this is implemented in this patch doesn't work well with workspace manifest where one select only a crate, and want to enable features for that one crate.

@tronical
Copy link
Contributor

tronical commented May 5, 2021

What's the restriction you're running into with set_property?

In #102 I have a patch for review that kind of works similar to that, allowing the user to set a custom property on the targets created by corrosion_import_crate which is passed on to the cargo build.

If there was a CORROSION_FEATURES property, then perhaps it could be added to the cargo command line by passing the feature list to the generator using $<TARGET_PROPERTY:${target_name},CORROSION_FEATURES> ?

@kwek20
Copy link
Contributor Author

kwek20 commented Jun 28, 2021

Hi guys! Thanks for the feedback, I do not recall why it didnt work, im pretty new to cmake so it could just be i did it wrong .)
I wont have time to fix it in the coming 3 weeks, but after that I can give it another shot

@tronical
Copy link
Contributor

tronical commented Sep 2, 2021

Hi! I've taken @kwek20 's initial commit and changed it to use a target property and submitted it as #108

@kwek20 kwek20 closed this Sep 2, 2021
@kwek20
Copy link
Contributor Author

kwek20 commented Sep 2, 2021

Oooh! Ill give it a test! Thanks man.. you know how life gets in the way of things :) @tronical

@tronical
Copy link
Contributor

tronical commented Sep 2, 2021

Oooh! Ill give it a test! Thanks man.. you know how life gets in the way of things :) @tronical

Haha yeah, I know that feeling :)

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.

Selectively import crates
3 participants