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

CMake: Test policy existence directly #334

Merged
merged 1 commit into from
Nov 25, 2023
Merged

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Nov 25, 2023

While it's possible to limit policy-change commands based on the CMake version(s) where they exist, that's not entirely future-proof. (Some very old policies may someday be removed from later releases.) It's also not necessary, as the most robust (and recommended) approach is to simply test for the existence of the policy itself, using if(POLICY ...).

@ebiggers ebiggers merged commit d4539a6 into ebiggers:master Nov 25, 2023
50 checks passed
@ebiggers
Copy link
Owner

Merged, thanks!

@ferdnyc ferdnyc deleted the patch-1 branch November 26, 2023 20:48
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.

2 participants