From 431f0b0da22d52963e962290319ec3b728e0efd3 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Wed, 21 Oct 2020 12:11:51 +0200 Subject: [PATCH] cmake: set CMP0054 to new in preload.cmake https://cmake.org/cmake/help/latest/policy/CMP0054.html --- mesonbuild/cmake/data/preload.cmake | 5 +++++ mesonbuild/mesondata.py | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mesonbuild/cmake/data/preload.cmake b/mesonbuild/cmake/data/preload.cmake index d875cff922b8..34d38e304ea1 100644 --- a/mesonbuild/cmake/data/preload.cmake +++ b/mesonbuild/cmake/data/preload.cmake @@ -4,6 +4,9 @@ endif() set(MESON_PS_LOADED ON) +cmake_policy(PUSH) +cmake_policy(SET CMP0054 NEW) # https://cmake.org/cmake/help/latest/policy/CMP0054.html + # Dummy macros that have a special meaning in the meson code macro(meson_ps_execute_delayed_calls) endmacro() @@ -75,3 +78,5 @@ endmacro() set(MESON_PS_DELAYED_CALLS add_custom_command;add_custom_target;set_property) meson_ps_reload_vars() + +cmake_policy(POP) diff --git a/mesonbuild/mesondata.py b/mesonbuild/mesondata.py index a75e8021982e..b0515c0e052e 100644 --- a/mesonbuild/mesondata.py +++ b/mesonbuild/mesondata.py @@ -266,6 +266,9 @@ set(MESON_PS_LOADED ON) +cmake_policy(PUSH) +cmake_policy(SET CMP0054 NEW) # https://cmake.org/cmake/help/latest/policy/CMP0054.html + # Dummy macros that have a special meaning in the meson code macro(meson_ps_execute_delayed_calls) endmacro() @@ -337,6 +340,8 @@ set(MESON_PS_DELAYED_CALLS add_custom_command;add_custom_target;set_property) meson_ps_reload_vars() + +cmake_policy(POP) ''' @@ -379,7 +384,7 @@ def write_to_private(self, env: 'Environment') -> Path: ), 'cmake/data/preload.cmake': DataFile( Path('cmake/data/preload.cmake'), - 'bbc441ededf2c7da2d0e640038ccbf4e818b73a2ba75084e1b4dbf05d8bca865', + '2b4e632aeb74acb2b441880cf85c0b6fcab03e75b182d3077715a97e739a7918', file_3_data_preload_cmake, ), }