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

[BUG] CMAIZE_PROJECT does not contain the correct project after including CMaize dependency #103

Open
zachcran opened this issue Apr 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@zachcran
Copy link
Contributor

Describe the bug
CMAIZE_PROJECT does not contain the correct CMaize project after a call to cmaize_find_or_build_dependency() that pulls in another project built with CMaize. This bug was brought to our attention in NWXCMake issue 12.

To Reproduce
Steps to reproduce the behavior:

  1. Create dummy projects A and B, where B depends on A using cmaize_find_or_build_dependency().
  2. Build B, printing the name of the CMAIZE_PROJECT object before and after the cmaize_find_or_build_dependency() call.
  3. These names should be the same (both should be project B) before and after the dependency is pulled in.
  4. Instead, before project A is built in, the CMAIZE_PROJECT name is correct, but after project A is pulled in, CMAIZE_PROJECT will contain project A.

Expected behavior
After pulling in project A, the context-dependent CMAIZE_PROJECT variable should contain project B again.

Additional context
For now, this can be worked around by getting the CMAIZE_PROJECT_${PROJECT_NAME} variable instead. This will get the CMAIZE_PROJECT object associated with the current project. Any CMaize project can be obtained using this method by getting CMAIZE_PROJECT_<desired_project_name>.

@zachcran zachcran added the bug Something isn't working label Apr 25, 2023
@zachcran zachcran changed the title [BUG] Squash this please!!!! [BUG] CMAIZE_PROJECT does not contain the correct project after dependency Apr 25, 2023
@zachcran zachcran changed the title [BUG] CMAIZE_PROJECT does not contain the correct project after dependency [BUG] CMAIZE_PROJECT does not contain the correct project after including CMaize dependency Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant