diff options
author | Sander Vrijders <[email protected]> | 2017-03-03 14:40:13 +0000 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2017-03-03 14:40:13 +0000 |
commit | d753cab1897e323b59923e2b0b11f550b087351c (patch) | |
tree | f1ba42d8db45941ef6d492095fc8ae1823ae6ee6 /cmake/CmakeUninstall.cmake.in | |
parent | b1b59cc4642faa99514f2288ba1bb5324a79850f (diff) | |
parent | c9fb31c7ebadc076b7c3bfd9dbe1c492c6ef7172 (diff) | |
download | ouroboros-d753cab1897e323b59923e2b0b11f550b087351c.tar.gz ouroboros-d753cab1897e323b59923e2b0b11f550b087351c.zip |
Merged in sandervrijders/ouroboros/be-cdap-flow (pull request #397)
Be cdap flow
Diffstat (limited to 'cmake/CmakeUninstall.cmake.in')
-rw-r--r-- | cmake/CmakeUninstall.cmake.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/CmakeUninstall.cmake.in b/cmake/CmakeUninstall.cmake.in new file mode 100644 index 00000000..4c07dc7b --- /dev/null +++ b/cmake/CmakeUninstall.cmake.in @@ -0,0 +1,21 @@ +if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt") +endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") + +file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) +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 + ) + if(NOT "${rm_retval}" STREQUAL 0) + message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") + endif(NOT "${rm_retval}" 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}") +endforeach(file) |