From f62a6f237b05bfc0df94b8a89c59dd74f1747bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matth=C3=A4us=20G=2E=20Chajdas?= Date: Sat, 13 Mar 2021 14:14:41 +0100 Subject: [PATCH] Enable policy 77 if possible. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using OpenEXR as a submodule, you currently can't set a variable outside of it as the option will override it (so you need to set the option.) With policy 77 in place, this works as expected. Signed-off-by: Matthäus G. Chajdas --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38567930eb..8d197242ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,11 @@ if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() +if(POLICY CMP0077) + # enable variables set outside to override options + cmake_policy(SET CMP0077 NEW) +endif() + ####################################### # Create project and include cmake # configuration files