File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ # Adapted from http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F May 1, 2014
2+
3+ if (NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt" )
4+ message (FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt" )
5+ endif (NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt" )
6+
7+ file (READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files )
8+ string (REGEX REPLACE "\n " ";" files "${files} " )
9+ file (WRITE "@CMAKE_BINARY_DIR@/sha256_install_manifest.txt" "" )
10+ foreach (file ${files} )
11+ if (IS_SYMLINK $ENV{DESTDIR}${file} )
12+ list (APPEND symbolic_links ${file} )
13+ endif ()
14+ file (SHA256 $ENV{DESTDIR}${file} ${file} _sha256)
15+ message (STATUS "${${file} _sha256} $ENV{DESTDIR}${file} " )
16+ file (APPEND "@CMAKE_BINARY_DIR@/sha256_install_manifest.txt" "${${file} _sha256} $ENV{DESTDIR}${file} \n " )
17+ endforeach ()
18+ message (STATUS "Symbolic links: ${symbolic_links} " )
Original file line number Diff line number Diff line change @@ -6,6 +6,14 @@ endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
66
77file (READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files )
88string (REGEX REPLACE "\n " ";" files "${files} " )
9+ foreach (file ${files} )
10+ if (NOT IS_SYMLINK $ENV{DESTDIR}${file} )
11+ file (SHA256 $ENV{DESTDIR}${file} ${file} _sha256)
12+ message (STATUS "${${file} _sha256} $ENV{DESTDIR}${file} " )
13+ else ()
14+ message (STATUS "$ENV{DESTDIR}${file} is a symbolic link." )
15+ endif ()
16+ endforeach ()
917foreach (file ${files} )
1018 message (STATUS "Uninstalling $ENV{DESTDIR}${file} " )
1119 if (IS_SYMLINK "$ENV{DESTDIR}${file} " OR EXISTS "$ENV{DESTDIR}${file} " )
You can’t perform that action at this time.
0 commit comments