aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Abhijit Kundu <abhijit.kundu@gatech.edu>2014-12-04 02:57:03 -0500
committerGravatar Abhijit Kundu <abhijit.kundu@gatech.edu>2014-12-04 02:57:03 -0500
commiteb3695d2fc75dd97bd0131672b9f160275e5caad (patch)
tree5518882e9416297b990089ef95c6d1c6ae19d375 /cmake
parent433bce5c3a18e0929e95bae6cb142f1ad920e5ac (diff)
Added cmake uninstall target.
This adds a cmake command make uninstall Running make uninstall removes the files installed by running make install
Diffstat (limited to 'cmake')
-rw-r--r--cmake/EigenUninstall.cmake40
1 files changed, 40 insertions, 0 deletions
diff --git a/cmake/EigenUninstall.cmake b/cmake/EigenUninstall.cmake
new file mode 100644
index 000000000..4dae8c85c
--- /dev/null
+++ b/cmake/EigenUninstall.cmake
@@ -0,0 +1,40 @@
+################ CMake Uninstall Template #######################
+# CMake Template file for uninstallation of files
+# mentioned in 'install_manifest.txt'
+#
+# Used by uinstall target
+#################################################################
+
+set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
+
+if(EXISTS ${MANIFEST})
+ message(STATUS "============== Uninstalling Eigen ===================")
+
+ file(STRINGS ${MANIFEST} files)
+ foreach(file ${files})
+ if(EXISTS ${file})
+ message(STATUS "Removing file: '${file}'")
+
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E remove ${file}
+ OUTPUT_VARIABLE rm_out
+ RESULT_VARIABLE rm_retval
+ )
+
+ if(NOT "${rm_retval}" STREQUAL 0)
+ message(FATAL_ERROR "Failed to remove file: '${file}'.")
+ endif()
+ else()
+ message(STATUS "File '${file}' does not exist.")
+ endif()
+ endforeach(file)
+
+ message(STATUS "========== Finished Uninstalling Eigen ==============")
+else()
+ message(STATUS "Cannot find install manifest: '${MANIFEST}'")
+ message(STATUS "Probably make install has not been performed")
+ message(STATUS " or install_manifest.txt has been deleted.")
+endif()
+
+
+