Skip to content

Redesign safeguard properties #16

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

Merged
merged 5 commits into from
Feb 11, 2025
Merged

Redesign safeguard properties #16

merged 5 commits into from
Feb 11, 2025

Conversation

aedart
Copy link
Contributor

@aedart aedart commented Feb 11, 2025

After the issues that have been identified concerning the propagation of CMAKE_MODULE_PATH (in #15), I realized that our safeguard_properties() utility function and its applied use for safeguarding the BUILD_TESTING option, was no longer a viable solution.

This PR redesigns safeguard_properties() to be a macro, instead of a function. Doing so ensures that whatever callback we execute can modify any property, such as the CMAKE_MODULE_PATH, without being encapsulated within a function's variable scope. Now, any 3rd party dependency that we define should not be affected, as is the case when using CPM.

References

@aedart aedart added bug Something isn't working enhancement New feature or request labels Feb 11, 2025
@aedart aedart requested a review from kernelguy February 11, 2025 09:00
@aedart aedart self-assigned this Feb 11, 2025
@aedart aedart merged commit 7839f4d into main Feb 11, 2025
4 checks passed
@aedart aedart deleted the redesign-safeguard-properties branch February 11, 2025 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants