Skip to content

Commit

Permalink
Merge pull request #826 from fridrich/fridrich
Browse files Browse the repository at this point in the history
exec_program is deprecated
  • Loading branch information
AlbrechtL authored Dec 6, 2024
2 parents 9e14d2e + 268f962 commit 53a82be
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cmake/cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ 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}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
execute_process(
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
RESULT_VARIABLE rm_res
)
if(NOT "${rm_retval}" STREQUAL 0)
if(NOT "${rm_res}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif(NOT "${rm_retval}" STREQUAL 0)
endif(NOT "${rm_res}" STREQUAL 0)
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
Expand Down

0 comments on commit 53a82be

Please sign in to comment.