Skip to content

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.

3 participants