Abhijit Kundu | eb3695d | 2014-12-04 02:57:03 -0500 | [diff] [blame] | 1 | ################ CMake Uninstall Template ####################### |
| 2 | # CMake Template file for uninstallation of files |
| 3 | # mentioned in 'install_manifest.txt' |
| 4 | # |
| 5 | # Used by uinstall target |
| 6 | ################################################################# |
| 7 | |
| 8 | set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt") |
| 9 | |
| 10 | if(EXISTS ${MANIFEST}) |
| 11 | message(STATUS "============== Uninstalling Eigen ===================") |
| 12 | |
| 13 | file(STRINGS ${MANIFEST} files) |
| 14 | foreach(file ${files}) |
| 15 | if(EXISTS ${file}) |
| 16 | message(STATUS "Removing file: '${file}'") |
| 17 | |
| 18 | execute_process( |
| 19 | COMMAND ${CMAKE_COMMAND} -E remove ${file} |
| 20 | OUTPUT_VARIABLE rm_out |
| 21 | RESULT_VARIABLE rm_retval |
| 22 | ) |
| 23 | |
| 24 | if(NOT "${rm_retval}" STREQUAL 0) |
| 25 | message(FATAL_ERROR "Failed to remove file: '${file}'.") |
| 26 | endif() |
| 27 | else() |
| 28 | message(STATUS "File '${file}' does not exist.") |
| 29 | endif() |
Hans Johnson | 6fb3e5f | 2019-10-31 11:36:27 -0500 | [diff] [blame] | 30 | endforeach() |
Abhijit Kundu | eb3695d | 2014-12-04 02:57:03 -0500 | [diff] [blame] | 31 | |
| 32 | message(STATUS "========== Finished Uninstalling Eigen ==============") |
| 33 | else() |
| 34 | message(STATUS "Cannot find install manifest: '${MANIFEST}'") |
| 35 | message(STATUS "Probably make install has not been performed") |
| 36 | message(STATUS " or install_manifest.txt has been deleted.") |
| 37 | endif() |
| 38 | |
| 39 | |
| 40 | |