forked from klee/klee
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`make uninstall` is enabled. Without this, uninstalling was done manually with `rm` command.
- Loading branch information
1 parent
b1ef0c8
commit 3678058
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") | ||
message(FATAL_ERROR "Cannot find install manifest: " | ||
"@CMAKE_BINARY_DIR@/install_manifest.txt") | ||
endif() | ||
|
||
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) | ||
string(REGEX REPLACE "\n" ";" files "${files}") | ||
foreach(file ${files}) | ||
set(file_path "$ENV{DESTDIR}${file}") | ||
message(STATUS "Uninstalling ${file_path}") | ||
if(IS_SYMLINK "${file_path}" OR EXISTS "${file_path}") | ||
# We could use ``file(REMOVE ...)`` here but then we wouldn't | ||
# know if the removal failed. | ||
execute_process(COMMAND | ||
"@CMAKE_COMMAND@" "-E" "remove" "${file_path}" | ||
RESULT_VARIABLE rm_retval | ||
) | ||
if(NOT "${rm_retval}" STREQUAL 0) | ||
message(FATAL_ERROR "Problem when removing \"${file_path}\"") | ||
endif() | ||
else() | ||
message(STATUS "File \"${file_path}\" does not exist.") | ||
endif() | ||
endforeach() |