From 22773d8816e769cdc4ac8388ec6b8df0de4c006a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 6 Nov 2024 09:14:36 +0100 Subject: [PATCH] build: Update uninstall.cmake.in The 'exec_program' command is deprecated in a newer CMake, resulting in the below warning for each uninstalled file. CMake Warning (dev) at uninstall.cmake:17 (exec_program): Policy CMP0153 is not set: The exec_program command should not be called. Run "cmake --help-policy CMP0153" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Use execute_process() instead. This warning is for project developers. Use -Wno-dev to suppress it. --- uninstall.cmake.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uninstall.cmake.in b/uninstall.cmake.in index 13dc359e9..9273f8899 100644 --- a/uninstall.cmake.in +++ b/uninstall.cmake.in @@ -14,10 +14,10 @@ string(REGEX REPLACE "\n" ";" files "${files}") foreach(file ${files}) message(STATUS "Uninstalling $ENV{DESTDIR}${file}") if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") - exec_program( - "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + execute_process( + COMMAND "@CMAKE_COMMAND@" -E remove "$ENV{DESTDIR}${file}" OUTPUT_VARIABLE rm_out - RETURN_VALUE rm_retval + RESULT_VARIABLE rm_retval ) if(NOT "${rm_retval}" STREQUAL 0) message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")