summaryrefslogtreecommitdiff
path: root/gr-utils/src/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in
diff options
context:
space:
mode:
authorJosh Blum2013-03-17 23:12:31 -0700
committerJosh Blum2013-03-17 23:12:31 -0700
commitbfefd11011987fe9755dd72d86ad4f052b3d263e (patch)
tree73b3960d46caed9996dfeff4856c3bcc546c9006 /gr-utils/src/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in
parentcb5ff01c491d4558a096fc1649b85283c36ccf91 (diff)
parent3693ee3259fa8bf2d9ad393842a80cd1fc330863 (diff)
downloadgnuradio-bfefd11011987fe9755dd72d86ad4f052b3d263e.tar.gz
gnuradio-bfefd11011987fe9755dd72d86ad4f052b3d263e.tar.bz2
gnuradio-bfefd11011987fe9755dd72d86ad4f052b3d263e.zip
Merge branch 'maint' of https://github.com/guruofquality/gnuradio into v3.6.4git_gras_support
Conflicts: gnuradio-core/src/lib/runtime/gr_block.cc gnuradio-core/src/lib/runtime/gr_block.h gnuradio-core/src/lib/runtime/gr_types.h
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)