summaryrefslogtreecommitdiffstats
path: root/cmake/Uninstall.cmake
diff options
context:
space:
mode:
authorSebastian Schmelzer2011-02-21 19:12:58 +0100
committerSebastian Schmelzer2011-02-21 19:12:58 +0100
commit6d0111d16d6d22ffa8a54e6ed165b333ca64b4b0 (patch)
treed8ef3dcbb73a22b2e741692ed1f570f4e2af6fe9 /cmake/Uninstall.cmake
parent[PVSMGR] New dummy icon (diff)
downloadpvs-6d0111d16d6d22ffa8a54e6ed165b333ca64b4b0.tar.gz
pvs-6d0111d16d6d22ffa8a54e6ed165b333ca64b4b0.tar.xz
pvs-6d0111d16d6d22ffa8a54e6ed165b333ca64b4b0.zip
add warnings for unused, unreachable code
moved cmake (module) files to cmake dir
Diffstat (limited to 'cmake/Uninstall.cmake')
-rw-r--r--cmake/Uninstall.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/Uninstall.cmake b/cmake/Uninstall.cmake
new file mode 100644
index 0000000..dbda3a2
--- /dev/null
+++ b/cmake/Uninstall.cmake
@@ -0,0 +1,21 @@
+IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+ MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
+ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+
+FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+STRING(REGEX REPLACE "\n" ";" files "${files}")
+FOREACH(file ${files})
+ MESSAGE(STATUS "Uninstalling: $ENV{DESTDIR}${file}")
+ IF(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(EXISTS "$ENV{DESTDIR}${file}")
+ MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
+ ENDIF(EXISTS "$ENV{DESTDIR}${file}")
+ENDFOREACH(file)