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

Set new CMake policy for upper-case <NAME>_ROOT variables #1642

Merged
merged 2 commits into from Dec 5, 2023

Conversation

hainest
Copy link
Contributor

@hainest hainest commented Dec 5, 2023

In CMake 3.27 and above the find_package() command now searches prefixes specified by the upper-case _ROOT CMake variable and the _ROOT environment variable in addition to the case-preserved _ROOT and _ROOT variables used since policy CMP0074. This policy provides compatibility with projects that have not been updated to avoid using _ROOT variables for other purposes.

The OLD behavior for this policy is to ignore _ROOT variables if the original has lower-case characters. The NEW behavior for this policy is to use _ROOT variables.

In CMake 3.27 and above the find_package(<PackageName>) command now
searches prefixes specified by the upper-case <PACKAGENAME>_ROOT CMake
variable and the <PACKAGENAME>_ROOT environment variable in addition to
the case-preserved <PackageName>_ROOT and <PackageName>_ROOT variables
used since policy CMP0074. This policy provides compatibility with
projects that have not been updated to avoid using <PACKAGENAME>_ROOT
variables for other purposes.

The OLD behavior for this policy is to ignore <PACKAGENAME>_ROOT
variables if the original <PackageName> has lower-case characters. The
NEW behavior for this policy is to use <PACKAGENAME>_ROOT variables.
@hainest hainest added the build label Dec 5, 2023
@hainest hainest requested a review from kupsch December 5, 2023 14:42
@hainest hainest self-assigned this Dec 5, 2023
@hainest hainest merged commit aa7b692 into master Dec 5, 2023
5 checks passed
@hainest hainest deleted the thaines/cmake_cmp0144 branch December 5, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants