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: Support <PackageName>_ROOT #2098

Merged
merged 2 commits into from
Sep 9, 2021
Merged

CMake: Support <PackageName>_ROOT #2098

merged 2 commits into from
Sep 9, 2021

Conversation

reddwarf69
Copy link
Contributor

I am no expert in all the policies, but I have seen no issues when using it with cmake 3.21.2.
My main user-case is getting fmt_ROOT to work (CMP0074).

The policy_max in cmake_minimum_required() already does that.
@gabime
Copy link
Owner

gabime commented Sep 9, 2021

The lines

if(POLICY CMP0077)
    cmake_policy(SET CMP0077 NEW) # option() honors variables already set
endif()

were added in pr #1946. Do you think it was wrong ?

@reddwarf69
Copy link
Contributor Author

No, it wasn't wrong. But after using cmake_minimum_required(VERSION 3.10...3.21) it becomes redundant. With it every cmake version knowing about CMP0077 will use CMP0077 NEW. In fact every cmake version <= 3.21 knowing about any CMPXXXX will use CMPXXXX NEW.

@gabime gabime merged commit 7812a4c into gabime:v1.x Sep 9, 2021
@gabime
Copy link
Owner

gabime commented Sep 9, 2021

Thanks. Merged

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