diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2013-02-12 20:19:12 -0800 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2013-02-12 20:19:12 -0800 |
commit | 77fd6e43695798b1e243e69f01f727b867bebe91 (patch) | |
tree | 1b956d099bff28f2bab851118c4854792e03ff01 /gr-utils/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in | |
parent | 02a6d1cf7966079a857ab198d633aea9401b6f17 (diff) | |
parent | 6cfa483a0414683c7edca812cca19198d7c2f724 (diff) |
Merge branch 'master' into next
Conflicts:
gr-utils/python/create-gnuradio-out-of-tree-project
Diffstat (limited to 'gr-utils/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in')
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in b/gr-utils/python/modtool/gr-newmod/cmake/cmake_uninstall.cmake.in new file mode 100644 index 0000000000..9ae1ae4bd6 --- /dev/null +++ b/gr-utils/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) |