summaryrefslogtreecommitdiff
path: root/gr-utils/src/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in
diff options
context:
space:
mode:
authormanojgudi2013-10-07 14:26:59 +0530
committermanojgudi2013-10-07 14:26:59 +0530
commit6bc92d66be9975d618ac4cd104e7f5ff6e8605f2 (patch)
tree3a77657667b4ef037f712ee68a5ec86c86cba5c5 /gr-utils/src/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in
parent452defdb4a78e9e826740ddf4b9673e926c568a4 (diff)
parente9576e44ef8f0ad67d8cd8a4e025a0f8da0727f8 (diff)
downloadgnuradio-6bc92d66be9975d618ac4cd104e7f5ff6e8605f2.tar.gz
gnuradio-6bc92d66be9975d618ac4cd104e7f5ff6e8605f2.tar.bz2
gnuradio-6bc92d66be9975d618ac4cd104e7f5ff6e8605f2.zip
merge from gr36_ni branch
Diffstat (limited to 'gr-utils/src/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in')
-rw-r--r--gr-utils/src/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in32
1 files changed, 32 insertions, 0 deletions
diff --git a/gr-utils/src/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in b/gr-utils/src/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in
new file mode 100644
index 000000000..9ae1ae4bd
--- /dev/null
+++ b/gr-utils/src/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in
@@ -0,0 +1,32 @@
+# http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
+
+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)
+ ELSEIF(IS_SYMLINK "$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)