From f233bfb7836f638488ad5ca657396fb578305bb4 Mon Sep 17 00:00:00 2001 From: MrColdboot <33491243+MrColdboot@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:13:59 -0400 Subject: [PATCH] Update deprecated CMake command `exec_program()` (#526) Per the cmake documentation: > *Changed in version 3.28:* This command is available only if policy CMP0153 > is not set to NEW. Port projects to the execute_process() command. > > *Deprecated since version 3.0:* Use the execute_process() command instead. To avoid warnings or future errors, calls to `exec_program()` have been replaced with the recommended `execute_process()` command. --- cmake/include/uninstall.cmake.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/include/uninstall.cmake.in b/cmake/include/uninstall.cmake.in index 2037e365..8ddc56a6 100644 --- a/cmake/include/uninstall.cmake.in +++ b/cmake/include/uninstall.cmake.in @@ -7,10 +7,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}")