Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update deprecated CMake command exec_program()
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.
  • Loading branch information
MrColdboot committed Apr 23, 2024
commit 9a657f0629aa367ac58c9753b7d8352a6a58a945
6 changes: 3 additions & 3 deletions cmake/include/uninstall.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down