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

Fix scope of CMake Policy variables #1096

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

StefanBruens
Copy link
Contributor

Commit 7d47760 ("moving some settings to an apposite cmake file")
moved the cmake_policy(SET CMP0072 NEW) from the toplevel scope to the
scope of the included file. For details, see
https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html

Set NO_POLICY_SCOPE when including the file, to move the POLICIES back
to the toplevel scope.

Fixes #1095.

Commit 7d47760 ("moving some settings to an apposite cmake file")
moved the `cmake_policy(SET CMP0072 NEW)` from the toplevel scope to the
scope of the included file. For details, see
https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html

Set NO_POLICY_SCOPE when including the file, to move the POLICIES back
to the toplevel scope. Also remove the extra cmake_minimum_version from
external/CMakeLists.txt, as it implicitly calls
`cmake_policy(VERSION 3.10)`, resetting any policies introduced with
cmake 3.11 and newer (i.e. CMP0072).

Fixes cnr-isti-vclab#1095.
@alemuntoni alemuntoni merged commit 366ceb1 into cnr-isti-vclab:master Sep 27, 2021
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.

CMake Policy CMP0072 (GLNVD) not applied correctly
2 participants