mirror of
https://github.com/curl/curl.git
synced 2025-09-09 21:52:40 +03:00
cmake: replace exec_program() with execute_process()
The `exec_program()` is deprecated as of CMake 3.0. This also removes the `rm_out` variable as it isn't used in the output. In `execute_process()` the `ERROR_QUIET` and `OUTPUT_QUIET` resemble the behavior of `exec_program(OUTPUT_VARIABLE)` behavior in this case. Closes #16779
This commit is contained in:
parent
23f6a1abfd
commit
d03429ce03
|
@ -35,10 +35,11 @@ string(REGEX REPLACE "\n" ";" _files "${_files}")
|
||||||
foreach(_file ${_files})
|
foreach(_file ${_files})
|
||||||
message(STATUS "Uninstalling $ENV{DESTDIR}${_file}")
|
message(STATUS "Uninstalling $ENV{DESTDIR}${_file}")
|
||||||
if(IS_SYMLINK "$ENV{DESTDIR}${_file}" OR EXISTS "$ENV{DESTDIR}${_file}")
|
if(IS_SYMLINK "$ENV{DESTDIR}${_file}" OR EXISTS "$ENV{DESTDIR}${_file}")
|
||||||
exec_program(
|
execute_process(
|
||||||
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${_file}\""
|
COMMAND "@CMAKE_COMMAND@" -E remove "$ENV{DESTDIR}${_file}"
|
||||||
OUTPUT_VARIABLE rm_out
|
RESULT_VARIABLE rm_retval
|
||||||
RETURN_VALUE rm_retval
|
OUTPUT_QUIET
|
||||||
|
ERROR_QUIET
|
||||||
)
|
)
|
||||||
if(NOT "${rm_retval}" STREQUAL 0)
|
if(NOT "${rm_retval}" STREQUAL 0)
|
||||||
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${_file}")
|
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${_file}")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user