diff options
| author | Alan Conway <aconway@apache.org> | 2013-04-01 16:47:10 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2013-04-01 16:47:10 +0000 |
| commit | 36b03a47bc92662cfe8b09f094884e2c223f5205 (patch) | |
| tree | da45e15a14c67c218265da8de5ce985c2e2cc29a /qpid/cpp/cmake_uninstall.cmake.in | |
| parent | 12f08eee5b5e0d3b77537e66180c74d7ac845ef4 (diff) | |
| download | qpid-python-36b03a47bc92662cfe8b09f094884e2c223f5205.tar.gz | |
QPID-4687: Add uninstall make target to cmake build
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1463202 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/cmake_uninstall.cmake.in')
| -rw-r--r-- | qpid/cpp/cmake_uninstall.cmake.in | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/qpid/cpp/cmake_uninstall.cmake.in b/qpid/cpp/cmake_uninstall.cmake.in new file mode 100644 index 0000000000..c6d809418e --- /dev/null +++ b/qpid/cpp/cmake_uninstall.cmake.in @@ -0,0 +1,22 @@ +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}") +list(REVERSE files) +foreach (file ${files}) + message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") + if (EXISTS "$ENV{DESTDIR}${file}") + execute_process( + COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" + OUTPUT_VARIABLE rm_out + RESULT_VARIABLE rm_retval + ) + if(NOT ${rm_retval} EQUAL 0) + message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") + endif (NOT ${rm_retval} EQUAL 0) + else (EXISTS "$ENV{DESTDIR}${file}") + message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") + endif (EXISTS "$ENV{DESTDIR}${file}") +endforeach(file) |
