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

Fix usage of corrosion via add_subdirectory by promoting variables to CACHE #181

Merged
merged 1 commit into from
May 6, 2022
Merged

Fix usage of corrosion via add_subdirectory by promoting variables to CACHE #181

merged 1 commit into from
May 6, 2022

Conversation

lxbrz
Copy link
Contributor

@lxbrz lxbrz commented May 6, 2022

Some of the variables that corrosion provides for its users like
Rust_VERSION<_MAJOR|_MINOR|_PATCH> are only available when corrosion is installed and imported
via find_package(Corrosion). This is because these variables are set as normal variables with
CMakes set() command, which limits their scope. When corrosion is imported via add_subdirectory,
these variables were only visible to corrosion, but not to the caller of add_subdirectory, which
is fixed by this commit.

… CACHE

Some of the variables that corrosion provides for its users like
`Rust_VERSION<_MAJOR|_MINOR|_PATCH>` are only available when corrosion is installed and imported
via `find_package(Corrosion)`. This is because these variables are set as normal variables with
CMakes set() command, which limits their scope. When corrosion is imported via `add_subdirectory`,
these variables were only visible to corrosion, but not to the caller of `add_subdirectory`, which
is fixed by this commit.
@jschwe jschwe self-requested a review May 6, 2022 11:21
@jschwe
Copy link
Collaborator

jschwe commented May 6, 2022

Thanks for fixing this. Looks good to me.

@jschwe jschwe merged commit cb37a27 into corrosion-rs:master May 6, 2022
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.

None yet

2 participants