File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,13 @@ string(REGEX REPLACE "\n" ";" files "${files}")
7
7
foreach (file ${files} )
8
8
message (STATUS "Uninstalling $ENV{DESTDIR}${file} " )
9
9
if (IS_SYMLINK "$ENV{DESTDIR}${file} " OR EXISTS "$ENV{DESTDIR}${file} " )
10
- # If the file exists or is symlink
11
- # run remove command through cmake in command mode
12
- # See https://cmake.org/cmake/help/latest/manual/cmake.1.html#run-a-command-line-tool
13
- exec_program (
14
- "@CMAKE_COMMAND@" ARGS "-E rm -rf \" $ENV{DESTDIR}${file} \" "
10
+ execute_process (
11
+ COMMAND "@CMAKE_COMMAND@" -E remove "$ENV{DESTDIR}${file} "
15
12
OUTPUT_VARIABLE rm_out
16
- RETURN_VALUE rm_retval
13
+ RESULT_VARIABLE rm_retval
17
14
)
18
15
if (NOT "${rm_retval} " STREQUAL 0)
19
- message (FATAL_ERROR "Error when removing $ENV{DESTDIR}${file} " )
16
+ message (FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file} " )
20
17
endif ()
21
18
else (IS_SYMLINK "$ENV{DESTDIR}${file} " OR EXISTS "$ENV{DESTDIR}${file} " )
22
19
message (STATUS "File $ENV{DESTDIR}${file} does not exist." )
You can’t perform that action at this time.
0 commit comments