Skip to content

Commit 3e82a26

Browse files
authored
Merge pull request #392 from PatKamin/fix-uninstallation-test
Fix uninstallation random failures on Windows
2 parents 47ce308 + cb36c43 commit 3e82a26

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

cmake/cmake_uninstall.cmake.in

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,7 @@ string(REGEX REPLACE "\n" ";" files "${files}")
99
foreach(file ${files})
1010
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
1111
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
12-
execute_process(
13-
COMMAND @CMAKE_COMMAND@ -E remove $ENV{DESTDIR}${file}
14-
OUTPUT_VARIABLE rm_out
15-
RESULT_VARIABLE rm_retval
16-
)
17-
if(NOT "${rm_retval}" STREQUAL 0)
18-
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
19-
endif(NOT "${rm_retval}" STREQUAL 0)
12+
FILE(REMOVE $ENV{DESTDIR}${file})
2013
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
2114
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
2215
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")

0 commit comments

Comments
 (0)